Views
No views yet
baichuan-7B-chatml 是支持多轮对话兼容于 ChatML 的模型。
模型基于 baichuan-7B 微调而成。
baichuan-7B-chatml 模型支持商用。但按照baichuan-7B的要求,如果将baichuan-7B衍生品用作商业用途,需要联系baichuan-7B 的许可方。baichuan-7B-chatml is a model that supports multi-turn dialog and is compatible with ChatML.
The model is fine-tuned based on baichuan-7B.
baichuan-7B-chatml model supports commercial use. However, according to the requirements of baichuan-7B, if baichuan-7B derivatives are used for commercial purposes, you need to contact baichuan-7B。1>>> from transformers import AutoTokenizer, AutoModelForCausalLM
2>>> tokenizer = AutoTokenizer.from_pretrained("tibok/baichuan-7B-chatml", trust_remote_code=True)
3>>> model = AutoModelForCausalLM.from_pretrained("tibok/baichuan-7B-chatml", device_map="auto", trust_remote_code=True)
4>>> response, history = model.chat(tokenizer, "请以『春天的北京』为题写一首诗歌", history=[])
5春天的北京,
6花开万丈,
7春意盎然,
8清风送暖。
9<|im_end|>
10>>> response, history = model.chat(tokenizer, "能不能再写一首关于香山的?", history=history)
11>>> print(response)
12香山之巅,
13芳草连天。
14清泉潺潺,
15山峦绵绵。
16<|im_end|>