Downloads · 30 days
992
2% of all-time downloads
hiyouga/Baichuan2-7B-Chat-LLaMAfied
Baichuan2-7B-Chat-LLaMAfied 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 other.
This is the LLaMAfied version of Baichuan2-7B-Chat model by Baichuan Inc.
Downloads · 30 days
992
2% of all-time downloads
All-time downloads
61K
Public
Repo size
30 GB
Likes
4
Public
Click a slice to open those files.
.bin15 GB · 100%
From the Hugging Face model README
This is the LLaMAfied version of Baichuan2-7B-Chat model by Baichuan Inc.
This model is converted with https://github.com/hiyouga/LLaMA-Factory/blob/main/tests/llamafy_baichuan2.py
You may use this model for fine-tuning in downstream tasks, we recommend using our efficient fine-tuning toolkit. https://github.com/hiyouga/LLaMA-Factory
Usage:
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
tokenizer = AutoTokenizer.from_pretrained("hiyouga/Baichuan2-7B-Chat-LLaMAfied", use_fast=False)
model = AutoModelForCausalLM.from_pretrained("hiyouga/Baichuan2-7B-Chat-LLaMAfied").cuda()
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
query = "<reserved_106>晚上睡不着怎么办<reserved_107>"
inputs = tokenizer([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 baichuan2 --model_name_or_path hiyouga/Baichuan2-7B-Chat-LLaMAfied
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 47.92 |
| ARC (25-shot) | 52.47 |
| HellaSwag (10-shot) | 74.04 |
| MMLU (5-shot) | 53.88 |
| TruthfulQA (0-shot) | 48.04 |
| Winogrande (5-shot) | 69.14 |
| GSM8K (5-shot) | 10.92 |
| DROP (3-shot) | 26.94 |