aashish1904
commited on
Commit
β’
e14c3d2
1
Parent(s):
208b1e7
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -12,6 +12,8 @@ tags:
|
|
12 |
- llama
|
13 |
- trl
|
14 |
- sft
|
|
|
|
|
15 |
|
16 |
---
|
17 |
|
@@ -23,13 +25,55 @@ This is quantized version of [mlabonne/FineLlama-3.1-8B](https://huggingface.co/
|
|
23 |
# Original Model Card
|
24 |
|
25 |
|
26 |
-
#
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
|
33 |
|
34 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
35 |
-
|
|
|
12 |
- llama
|
13 |
- trl
|
14 |
- sft
|
15 |
+
datasets:
|
16 |
+
- mlabonne/FineTome-100k
|
17 |
|
18 |
---
|
19 |
|
|
|
25 |
# Original Model Card
|
26 |
|
27 |
|
28 |
+
# π· FineLlama-3.1-8B
|
29 |
|
30 |
+
![](https://i.imgur.com/jUDo6ID.jpeg)
|
31 |
+
|
32 |
+
This is a finetune of [meta-llama/Meta-Llama-3.1-8B](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B) made for my article ["Fine-tune Llama 3.1 Ultra-Efficiently with Unsloth"](https://huggingface.co/blog/mlabonne/sft-llama3).
|
33 |
+
|
34 |
+
It was trained on 100k super high-quality samples from the [mlabonne/FineTome-100k](https://huggingface.co/datasets/mlabonne/FineTome-100k) dataset.
|
35 |
+
|
36 |
+
**Try the demo**: https://huggingface.co/spaces/mlabonne/FineLlama-3.1-8B
|
37 |
+
|
38 |
+
## π Applications
|
39 |
+
|
40 |
+
This model was made for educational purposes. I recommend using Meta's instruct model for real applications.
|
41 |
+
|
42 |
+
## β‘ Quantization
|
43 |
+
|
44 |
+
* **GGUF**: https://huggingface.co/mlabonne/FineLlama-3.1-8B-GGUF
|
45 |
+
|
46 |
+
## π Evaluation
|
47 |
+
|
48 |
+
TBD.
|
49 |
+
|
50 |
+
## π» Usage
|
51 |
+
|
52 |
+
```python
|
53 |
+
!pip install -qU transformers accelerate
|
54 |
+
|
55 |
+
from transformers import AutoTokenizer
|
56 |
+
import transformers
|
57 |
+
import torch
|
58 |
+
|
59 |
+
model = "mlabonne/FineLlama-3.1-8B"
|
60 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
61 |
+
|
62 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
63 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
64 |
+
pipeline = transformers.pipeline(
|
65 |
+
"text-generation",
|
66 |
+
model=model,
|
67 |
+
torch_dtype=torch.float16,
|
68 |
+
device_map="auto",
|
69 |
+
)
|
70 |
+
|
71 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
72 |
+
print(outputs[0]["generated_text"])
|
73 |
+
```
|
74 |
+
|
75 |
+
---
|
76 |
|
77 |
This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
|
78 |
|
79 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
|