Downloads · 30 days
52
4% of all-time downloads
hiyouga/Llama-2-Chinese-13b-chat
Llama-2-Chinese-13b-chat is a text generation model from hiyouga. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama2.
A bilingual instruction-tuned LoRA model of https://huggingface.co/meta-llama/Llama-2-13b-hf
Downloads · 30 days
52
4% of all-time downloads
All-time downloads
1.5K
Public
Repo size
26.5 GB
Likes
35
Public
Click a slice to open those files.
.bin26.3 GB · 100%
From the Hugging Face model README
A bilingual instruction-tuned LoRA model of https://huggingface.co/meta-llama/Llama-2-13b-hf
Usage:
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
tokenizer = AutoTokenizer.from_pretrained("hiyouga/Llama-2-Chinese-13b-chat")
model = AutoModelForCausalLM.from_pretrained("hiyouga/Llama-2-Chinese-13b-chat").cuda()
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
query = "晚上睡不着怎么办"
template = (
"A chat between a curious user and an artificial intelligence assistant. "
"The assistant gives helpful, detailed, and polite answers to the user's questions.\n"
"Human: {}\nAssistant: "
)
inputs = tokenizer([template.format(query)], return_tensors="pt")
inputs = inputs.to("cuda")
generate_ids = model.generate(**inputs, max_new_tokens=256, streamer=streamer)
You could also alternatively launch a CLI demo by using the script in LLaMA-Factory
python src/cli_demo.py --template default --model_name_or_path hiyouga/Llama-2-Chinese-13b-chat
The model is trained using the web UI of LLaMA-Factory.

How to use this web UI: https://zhuanlan.zhihu.com/p/645010851
Loss curve:

Examples:
Q: 你是谁
A: 我是 <NAME>,一款由 <AUTHOR> 开发的人工智能助手。我可以回答各种问题,提供帮助和支持。
Q: 如何提高公司的销售额?
A: 以下是一些有助于提高公司销售额的想法:
Q: 给定下面的两个列表,使用Python解释器找到它们之间的相同元素。 List1:[1, 2, 3, 4, 5, 6] List2:[4, 5, 6, 7, 8, 9]
A: 以下是使用Python解释器找到两个列表中共同元素的示例:
# 列表1
lst1 = [1, 2, 3, 4, 5, 6]
# 列表2
lst2 = [4, 5, 6, 7, 8, 9]
# 找到共同元素
common_elements = list(set(lst1) & set(lst2))
print(common_elements)
此示例创建两个列表,然后使用Python中的集合操作符(&)找到它们共同的元素。最后,输出结果。 在此示例中,共同元素为[4, 5, 6]。
Q: 将以下文本翻译成英语:我想去旅行并尽可能多地了解世界上的文化。
A: I want to travel and learn as much as possible about the cultures of the world.
Q: 解释以下缩写: JSON、CEO、PDF、HTML、NASA
A: 以下是缩写的解释: