Training completed for llama3-nyc-test
Browse files
README.md
CHANGED
|
@@ -1,81 +1,59 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: unsloth/llama-3-8b
|
| 3 |
-
library_name:
|
| 4 |
-
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
- sft
|
| 9 |
-
- transformers
|
| 10 |
- trl
|
| 11 |
-
|
| 12 |
---
|
| 13 |
|
| 14 |
-
# llama3-nyc-test
|
| 15 |
-
|
| 16 |
-
This model is a fine-tuned version of [unsloth/llama-3-8b](https://huggingface.co/unsloth/llama-3-8b) using LoRA (Low-Rank Adaptation) and quantization techniques.
|
| 17 |
-
|
| 18 |
-
## Model Details
|
| 19 |
-
|
| 20 |
-
- **Base Model:** unsloth/llama-3-8b
|
| 21 |
-
- **Fine-tuned Model:** comp5331poi/llama3-nyc-test
|
| 22 |
-
- **Training Run:** llama3-nyc-test
|
| 23 |
-
- **Device:** cuda
|
| 24 |
-
|
| 25 |
-
## Training Configuration
|
| 26 |
|
| 27 |
-
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
-
- **Batch Size:** 4
|
| 31 |
-
- **Gradient Accumulation Steps:** 4
|
| 32 |
-
- **Effective Batch Size:** 16
|
| 33 |
-
- **Learning Rate:** 1e-05
|
| 34 |
-
- **Learning Rate Scheduler:** constant
|
| 35 |
-
- **Warmup Steps:** 20
|
| 36 |
-
- **Max Sequence Length:** 2048
|
| 37 |
-
- **Optimizer:** paged_adamw_8bit
|
| 38 |
-
- **Max Gradient Norm:** 0.3
|
| 39 |
-
- **Random Seed:** 43
|
| 40 |
|
| 41 |
-
|
|
|
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
|
| 49 |
-
##
|
| 50 |
|
| 51 |
-
|
| 52 |
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
| 57 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 58 |
-
from peft import PeftModel
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
-
#
|
| 64 |
-
model = PeftModel.from_pretrained(base_model, "comp5331poi/llama3-nyc-test")
|
| 65 |
|
| 66 |
-
# Load tokenizer
|
| 67 |
-
tokenizer = AutoTokenizer.from_pretrained("unsloth/llama-3-8b")
|
| 68 |
-
|
| 69 |
-
# Generate text
|
| 70 |
-
inputs = tokenizer("Your prompt here", return_tensors="pt")
|
| 71 |
-
outputs = model.generate(**inputs, max_length=2048)
|
| 72 |
-
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 73 |
-
```
|
| 74 |
|
| 75 |
-
## Framework Versions
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: unsloth/llama-3-8b-bnb-4bit
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: llama3-nyc-test
|
| 5 |
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- unsloth
|
| 8 |
- sft
|
|
|
|
| 9 |
- trl
|
| 10 |
+
licence: license
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Model Card for llama3-nyc-test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
This model is a fine-tuned version of [unsloth/llama-3-8b-bnb-4bit](https://huggingface.co/unsloth/llama-3-8b-bnb-4bit).
|
| 16 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 17 |
|
| 18 |
+
## Quick start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
```python
|
| 21 |
+
from transformers import pipeline
|
| 22 |
|
| 23 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 24 |
+
generator = pipeline("text-generation", model="comp5331poi/llama3-nyc-test", device="cuda")
|
| 25 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 26 |
+
print(output["generated_text"])
|
| 27 |
+
```
|
| 28 |
|
| 29 |
+
## Training procedure
|
| 30 |
|
| 31 |
+
|
| 32 |
|
| 33 |
|
| 34 |
+
This model was trained with SFT.
|
| 35 |
|
| 36 |
+
### Framework versions
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
- TRL: 0.23.0
|
| 39 |
+
- Transformers: 4.56.2
|
| 40 |
+
- Pytorch: 2.8.0
|
| 41 |
+
- Datasets: 4.3.0
|
| 42 |
+
- Tokenizers: 0.22.1
|
| 43 |
|
| 44 |
+
## Citations
|
|
|
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
|
|
|
| 47 |
|
| 48 |
+
Cite TRL as:
|
| 49 |
+
|
| 50 |
+
```bibtex
|
| 51 |
+
@misc{vonwerra2022trl,
|
| 52 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 53 |
+
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{\'e}dec},
|
| 54 |
+
year = 2020,
|
| 55 |
+
journal = {GitHub repository},
|
| 56 |
+
publisher = {GitHub},
|
| 57 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 58 |
+
}
|
| 59 |
+
```
|
adapter_config.json
CHANGED
|
@@ -29,13 +29,13 @@
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"down_proj",
|
| 33 |
"q_proj",
|
| 34 |
-
"v_proj",
|
| 35 |
-
"o_proj",
|
| 36 |
"up_proj",
|
|
|
|
|
|
|
| 37 |
"gate_proj",
|
| 38 |
-
"
|
|
|
|
| 39 |
],
|
| 40 |
"target_parameters": null,
|
| 41 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
|
|
|
| 32 |
"q_proj",
|
|
|
|
|
|
|
| 33 |
"up_proj",
|
| 34 |
+
"k_proj",
|
| 35 |
+
"v_proj",
|
| 36 |
"gate_proj",
|
| 37 |
+
"o_proj",
|
| 38 |
+
"down_proj"
|
| 39 |
],
|
| 40 |
"target_parameters": null,
|
| 41 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 167832240
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e28406c691e1202c9a1c124f06a52499ae3a1f956671b030f95ac633c86c89f
|
| 3 |
size 167832240
|
logs/events.out.tfevents.1761384274.vislab-4090.675146.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a90eca3e00f3402be292050bf1fc9c774837a3183d916295c0f6c459c5db9751
|
| 3 |
+
size 14664
|
logs/events.out.tfevents.1761386231.vislab-4090.692860.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b54d165a1eed9396ab44e02deacbafb07292da950e0b3777b29114cad157ee67
|
| 3 |
+
size 83651
|