Skip to content

Push Message formatting into _gen_model_input #1295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 14, 2024
Merged

Conversation

Jack-Khuu
Copy link
Contributor

Minor QoL change; push the formatting of text string prompts into the helper


Testing

Tested via browser:

 python torchchat.py server llama3.2-11b
streamlit run torchchat/usages/browser.py

Tested in CLI

python3 torchchat.py generate llama3.2-1b
Using device=cuda NVIDIA PG509-210
Loading model...
Time to load model: 1.55 seconds
-----------------------------------------------------------
Hello, my name is Jane Doe and I am a citizen of the United States. I am a survivor of a violent crime, and I am reaching out to seek support and resources.

Please note that I am not a victim of a violent crime, but I am still seeking help and guidance. This is a difficult time for me, and I want to know that I have the support and resources that I need. I am a citizen of the United States and I am looking for help from the government agencies that provide assistance to victims of crime.

In order to provide you with the best possible assistance, I would like to know more about your organization. What type of support and resources do you provide to victims of crime? What services do you offer to help me take the first steps towards healing and recovery?

I would also appreciate any information about the types of resources that may be available to me such as counseling, medical care, food, shelter, and other forms of assistance. I am open to seeking out any and all
python torchchat.py generate llama3.2-11B --prompt "What's in this image?" --image-prompt assets/dog.jpg --compile
Using device=cuda NVIDIA PG509-210
Loading model...
Time to load model: 8.50 seconds
-----------------------------------------------------------
What's in this image?The image depicts a dog sitting on a skateboard, wearing sunglasses and a collar. The dog was likely superimposed on the photo, as it is not a realistic location for a dog to be on a skateboard.

@Jack-Khuu Jack-Khuu requested review from Gasoonjia and vmpuri October 12, 2024 00:10
Copy link

pytorch-bot bot commented Oct 12, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchchat/1295

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit a505a59 with merge base 11dcbeb (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 12, 2024
@Jack-Khuu Jack-Khuu merged commit d1ab6e0 into main Oct 14, 2024
52 checks passed
@Jack-Khuu Jack-Khuu deleted the undo-behavior-change branch January 24, 2025 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants