Views
No views yet
| 模型 | 下载地址 | 说明 |
|---|---|---|
| Chinese-Mistral-7B | HuggingFace wisemodel ModelScope | 完整基座模型 |
| Chinese-Mistral-7B-Instruct-v0.1 | HuggingFace wisemodel ModelScope | 完整指令精调模型 中英文alpaca_gpt4进行lora微调 |
| Chinese-Mistral-7B-Instruct-v0.2 | HuggingFace wisemodel | 完整指令精调模型 百万条高质量数据进行lora微调 |
| 模型名称 | C-Eval | CMMLU | MMLU | 平均得分 |
|---|---|---|---|---|
| Linly-Al/Chinese-LLaMA-2-7B-hf | 31.2 | 30.14 | 35.09 | 32.14 |
| hfl/chinese-llama-2-7b | 27.4 | 33.38 | 37.25 | 32.68 |
| Linly-Al/Chinese-LLaMA-2-13B-hf | 39.9 | 42.48 | 52.54 | 44.97 |
| hfl/chinese-llama-2-13b | 41.0 | 43.25 | 52.94 | 45.73 |
| gywy/Mistral-7B-v0.1-chinese | 37.4 | 36.45 | 37.38 | 37.08 |
| OpenBuddy/openbuddy-mistral-7b-v13-base | 44.4 | 46.32 | 57.79 | 49.50 |
| Chinese-Mistral-7B (本模型) | 47.5 | 47.52 | 58.29 | 51.10 |
| 模型名称 | 模型类型 | 词表大小 | Token数量 | 压缩率 |
|---|---|---|---|---|
| meta-llama/Llama-2-7b-hf | Llama | 32000 | 97406876 | 0.6880 |
| mistralai/Mistral-7B-v0.1 | Mistral | 32000 | 76269008 | 0.8787 |
| THUDM/chatglm2-6b | GLM | 64789 | 43487673 | 1.5410 |
| Linly-Al/Chinese-LLaMA-2-13B-hf | Llama | 40076 | 65402900 | 1.0246 |
| hfl/chinese-llama-2-13b | Llama | 55296 | 45763513 | 1.4644 |
| OpenBuddy/openbuddy-mistral-7b-v13-base | Mistral | 36608 | 65329642 | 1.0256 |
| gywy/Mistral-7B-v0.1-chinese | Mistral | 48593 | 46670146 | 1.4359 |
| Chinese-Mistral-7B (本模型) | Mistral | 63872 | 43044156 | 1.5569 |
1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu")
5
6model_path = "itpossible/Chinese-Mistral-7B-v0.1"
7tokenizer = AutoTokenizer.from_pretrained(model_path)
8model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=torch.bfloat16, device_map=device)
9
10text = "我是一个人工智能助手,我能够帮助你做如下这些事情:"
11inputs = tokenizer(text, return_tensors="pt").to(device)
12
13outputs = model.generate(**inputs, max_new_tokens=120, do_sample=True)
14print(tokenizer.decode(outputs[0], skip_special_tokens=True))1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu")
5
6model_path = "itpossible/Chinese-Mistral-7B-Instruct-v0.1"
7tokenizer = AutoTokenizer.from_pretrained(model_path)
8model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=torch.bfloat16, device_map=device)
9
10text = "请为我推荐中国三座比较著名的山"
11messages = [{"role": "user", "content": text}]
12
13inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(device)
14outputs = model.generate(inputs, max_new_tokens=300, do_sample=True)
15outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
16print(outputs)1@misc{Chinese-Mistral,
2 author = {Zhou, Chen and Yuqi, Bai},
3 title = {Chinese-Mistral: An Efficient and Effective Chinese Large Language Model},
4 year = {2024},
5 publisher = {GitHub},
6 journal = {GitHub repository},
7 howpublished = {\url{https://github.com/THU-ESIS/Chinese-Mistral}}
8}