StarWhisper
StarWhisper copied to clipboard
Potentially open sourcing the model on HF and create a demo there?
Hi YuYang,
Congratulations on your great work! It would be really nice if you can upload the model to Hugging Face hub.
This would help model discovery and integration with tools.
For example, this is the ChatGLM repo on Hugging Face. https://huggingface.co/THUDM/chatglm2-6b With that, the model can be invoked with a few lines of code.
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True).half().cuda()
model = model.eval()
response, history = model.chat(tokenizer, "你好", history=[])
print(response)
你好👋!我是人工智能助手 ChatGLM-6B,很高兴见到你,欢迎问我任何问题。
response, history = model.chat(tokenizer, "晚上睡不着应该怎么办", history=history)
print(response)
Also you can fork nice demos like https://huggingface.co/spaces/mikeee/chatglm2-6b-4bit to create your own demos. It will make it very easy for users to use and amplify the impact of your project.
If you run into any issues, feel free to let us know and we're happy to help. :-) My WeChat ID is zhou_a_zhou