File size: 2,301 Bytes
8cbd3dc
 
 
 
 
 
 
 
 
 
e40dbd1
 
 
 
8cbd3dc
 
 
 
 
 
 
 
 
1b2b293
ae50fca
1b2b293
8cbd3dc
 
 
1b2b293
 
8cbd3dc
 
1b2b293
 
 
 
 
 
 
 
 
 
8cbd3dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
base_model: unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit
library_name: transformers
model_name: llama3.2_3B_Instruct
tags:
- generated_from_trainer
- unsloth
- trl
- sft
licence: license
datasets:
- roberthsu2003/for_llama3_Instruct
language:
- zh
---

# Model Card for llama3.2_3B_Instruct

This model is a fine-tuned version of [unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit](https://huggingface.co/unsloth/llama-3.2-3b-instruct-unsloth-bnb-4bit).
It has been trained using [TRL](https://github.com/huggingface/trl).

## Quick start

- 注意沒辦法在mac silicon上執行
- 注意,請使用cuda GPU 執行,unsloth訓練的只支援GPU

```python
from transformers import pipeline

question = "請問光的3原色?"
generator = pipeline("text-generation", model="roberthsu2003/llama3.2_3B_Instruct",device_map="auto", trust_remote_code=True)
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])

#======output==========
光的三原色是紅、藍和綠色。


output = generator([{"role": "user", "content": "請介紹一下台灣這個國家"}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])

#==========output==========
台灣是位於東亞的島國,擁有人口超過3.5億。它是一個繁榮的經濟體系,擁有世界上最好的科技、教育和醫療系統。台灣是世界上最多種語言的國家,主要語言包括繁體中文、台語、 Hoklo、 Hakka 和 Min Nan。它是世界上最多種宗教的國家,主要宗教包括佛教、天主教、基督教、伊斯蘭教和無神論
```

## Training procedure

 


This model was trained with SFT.

### Framework versions

- TRL: 0.15.2
- Transformers: 4.50.3
- Pytorch: 2.6.0+cu124
- Datasets: 3.5.0
- Tokenizers: 0.21.1

## Citations



Cite TRL as:
    
```bibtex
@misc{vonwerra2022trl,
	title        = {{TRL: Transformer Reinforcement Learning}},
	author       = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
	year         = 2020,
	journal      = {GitHub repository},
	publisher    = {GitHub},
	howpublished = {\url{https://github.com/huggingface/trl}}
}
```