Instructions to use eantropix/qlora-tutorial with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use eantropix/qlora-tutorial with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("eantropix/qlora-tutorial", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add files using upload-large-folder tool
Browse files- gemma-news-lora-r16-d05-e1/README.md +58 -0
- gemma-news-lora-r16-d05-e1/adapter_config.json +40 -0
- gemma-news-lora-r16-d05-e1/added_tokens.json +3 -0
- gemma-news-lora-r16-d05-e1/special_tokens_map.json +33 -0
- gemma-news-lora-r16-d05-e1/tokenizer_config.json +0 -0
- gemma-news-lora-r16-d05-e1/train_log.json +1 -0
- gemma-news-lora-r16-d05-e2/README.md +58 -0
- gemma-news-lora-r16-d05-e2/adapter_config.json +40 -0
- gemma-news-lora-r16-d05-e2/added_tokens.json +3 -0
- gemma-news-lora-r16-d05-e2/special_tokens_map.json +33 -0
- gemma-news-lora-r16-d05-e2/tokenizer_config.json +0 -0
- gemma-news-lora-r16-d05-e2/train_log.json +1 -0
- gemma-news-lora-r16-d05-e3/README.md +58 -0
- gemma-news-lora-r16-d05-e3/adapter_config.json +40 -0
- gemma-news-lora-r16-d05-e3/added_tokens.json +3 -0
- gemma-news-lora-r16-d05-e3/special_tokens_map.json +33 -0
- gemma-news-lora-r16-d05-e3/tokenizer_config.json +0 -0
- gemma-news-lora-r16-d05-e3/train_log.json +1 -0
- gemma-news-lora-r16-d10-e3/adapter_config.json +40 -0
- gemma-news-lora-r16-d10-e3/train_log.json +1 -0
- gemma-news-lora-r32-d01-e3/README.md +58 -0
- gemma-news-lora-r32-d01-e3/adapter_config.json +40 -0
- gemma-news-lora-r32-d01-e3/added_tokens.json +3 -0
- gemma-news-lora-r32-d01-e3/special_tokens_map.json +33 -0
- gemma-news-lora-r32-d01-e3/tokenizer_config.json +0 -0
- gemma-news-lora-r32-d01-e3/train_log.json +1 -0
- gemma-news-lora-r32-d05-e2/README.md +58 -0
- gemma-news-lora-r32-d05-e2/adapter_config.json +40 -0
- gemma-news-lora-r32-d05-e2/added_tokens.json +3 -0
- gemma-news-lora-r32-d05-e2/special_tokens_map.json +33 -0
- gemma-news-lora-r32-d05-e2/tokenizer_config.json +0 -0
- gemma-news-lora-r32-d05-e2/train_log.json +1 -0
- gemma-news-lora-r32-d05-e3/README.md +58 -0
- gemma-news-lora-r32-d05-e3/adapter_config.json +40 -0
- gemma-news-lora-r32-d05-e3/added_tokens.json +3 -0
- gemma-news-lora-r32-d05-e3/special_tokens_map.json +33 -0
- gemma-news-lora-r32-d05-e3/tokenizer_config.json +0 -0
- gemma-news-lora-r32-d05-e3/train_log.json +1 -0
- gemma-news-lora-r64-d05-e3/README.md +58 -0
- gemma-news-lora-r64-d05-e3/adapter_config.json +40 -0
- gemma-news-lora-r64-d05-e3/added_tokens.json +3 -0
- gemma-news-lora-r64-d05-e3/special_tokens_map.json +33 -0
- gemma-news-lora-r64-d05-e3/tokenizer_config.json +0 -0
- gemma-news-lora-r64-d05-e3/train_log.json +1 -0
- gemma-news-lora-r8-d05-e2/README.md +58 -0
- gemma-news-lora-r8-d05-e2/adapter_config.json +40 -0
- gemma-news-lora-r8-d05-e2/added_tokens.json +3 -0
- gemma-news-lora-r8-d05-e2/special_tokens_map.json +33 -0
- gemma-news-lora-r8-d05-e2/tokenizer_config.json +0 -0
- gemma-news-lora-r8-d05-e2/train_log.json +1 -0
gemma-news-lora-r16-d05-e1/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/gemma-3-1b-pt
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: gemma-news-lora-r16-d05-e1
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- sft
|
| 8 |
+
- trl
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for gemma-news-lora-r16-d05-e1
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [google/gemma-3-1b-pt](https://huggingface.co/google/gemma-3-1b-pt).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
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?"
|
| 23 |
+
generator = pipeline("text-generation", model="eantropix/gemma-news-lora-r16-d05-e1", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
+
|
| 35 |
+
### Framework versions
|
| 36 |
+
|
| 37 |
+
- TRL: 0.21.0
|
| 38 |
+
- Transformers: 4.57.0
|
| 39 |
+
- Pytorch: 2.8.0
|
| 40 |
+
- Datasets: 3.3.2
|
| 41 |
+
- Tokenizers: 0.22.1
|
| 42 |
+
|
| 43 |
+
## Citations
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
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},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
gemma-news-lora-r16-d05-e1/adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "google/gemma-3-1b-pt",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
+
"fan_in_fan_out": false,
|
| 9 |
+
"inference_mode": true,
|
| 10 |
+
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
+
"layers_pattern": null,
|
| 13 |
+
"layers_to_transform": null,
|
| 14 |
+
"loftq_config": {},
|
| 15 |
+
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
+
"lora_dropout": 0.05,
|
| 18 |
+
"megatron_config": null,
|
| 19 |
+
"megatron_core": "megatron.core",
|
| 20 |
+
"modules_to_save": [
|
| 21 |
+
"lm_head",
|
| 22 |
+
"embed_tokens"
|
| 23 |
+
],
|
| 24 |
+
"peft_type": "LORA",
|
| 25 |
+
"r": 16,
|
| 26 |
+
"rank_pattern": {},
|
| 27 |
+
"revision": null,
|
| 28 |
+
"target_modules": [
|
| 29 |
+
"k_proj",
|
| 30 |
+
"q_proj",
|
| 31 |
+
"o_proj",
|
| 32 |
+
"up_proj",
|
| 33 |
+
"gate_proj",
|
| 34 |
+
"down_proj",
|
| 35 |
+
"v_proj"
|
| 36 |
+
],
|
| 37 |
+
"task_type": "CAUSAL_LM",
|
| 38 |
+
"use_dora": false,
|
| 39 |
+
"use_rslora": false
|
| 40 |
+
}
|
gemma-news-lora-r16-d05-e1/added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
gemma-news-lora-r16-d05-e1/special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
gemma-news-lora-r16-d05-e1/tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
gemma-news-lora-r16-d05-e1/train_log.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"loss": 2.5261, "grad_norm": 1.8403441905975342, "learning_rate": 0.0002, "num_tokens": 3807.0, "mean_token_accuracy": 0.4527951776981354, "epoch": 0.0017613386173491853, "step": 1}, {"eval_loss": 2.4697487354278564, "eval_runtime": 31.2361, "eval_samples_per_second": 8.324, "eval_steps_per_second": 8.324, "eval_num_tokens": 213783.0, "eval_mean_token_accuracy": 0.4634951359950579, "epoch": 0.10039630118890357, "step": 57}, {"eval_loss": 2.4586329460144043, "eval_runtime": 31.3188, "eval_samples_per_second": 8.302, "eval_steps_per_second": 8.302, "eval_num_tokens": 424054.0, "eval_mean_token_accuracy": 0.46460805661403215, "epoch": 0.20079260237780713, "step": 114}, {"eval_loss": 2.4495978355407715, "eval_runtime": 31.2692, "eval_samples_per_second": 8.315, "eval_steps_per_second": 8.315, "eval_num_tokens": 633043.0, "eval_mean_token_accuracy": 0.4651597452851442, "epoch": 0.3011889035667107, "step": 171}, {"loss": 2.4518, "grad_norm": 1.296280026435852, "learning_rate": 0.0002, "num_tokens": 738884.0, "mean_token_accuracy": 0.46565380026048153, "epoch": 0.3522677234698371, "step": 200}, {"eval_loss": 2.446908473968506, "eval_runtime": 31.2495, "eval_samples_per_second": 8.32, "eval_steps_per_second": 8.32, "eval_num_tokens": 839084.0, "eval_mean_token_accuracy": 0.46588316273230773, "epoch": 0.40158520475561427, "step": 228}, {"eval_loss": 2.439793586730957, "eval_runtime": 31.3151, "eval_samples_per_second": 8.303, "eval_steps_per_second": 8.303, "eval_num_tokens": 1049460.0, "eval_mean_token_accuracy": 0.4673487099317404, "epoch": 0.5019815059445178, "step": 285}, {"eval_loss": 2.433459520339966, "eval_runtime": 31.2546, "eval_samples_per_second": 8.319, "eval_steps_per_second": 8.319, "eval_num_tokens": 1262092.0, "eval_mean_token_accuracy": 0.46751116399581616, "epoch": 0.6023778071334214, "step": 342}, {"eval_loss": 2.4308032989501953, "eval_runtime": 31.3448, "eval_samples_per_second": 8.295, "eval_steps_per_second": 8.295, "eval_num_tokens": 1470942.0, "eval_mean_token_accuracy": 0.46810257469232264, "epoch": 0.702774108322325, "step": 399}, {"loss": 2.4256, "grad_norm": 1.313427209854126, "learning_rate": 0.0002, "num_tokens": 1474663.0, "mean_token_accuracy": 0.46981160558760166, "epoch": 0.7045354469396742, "step": 400}, {"eval_loss": 2.425360679626465, "eval_runtime": 31.3244, "eval_samples_per_second": 8.3, "eval_steps_per_second": 8.3, "eval_num_tokens": 1681400.0, "eval_mean_token_accuracy": 0.4685108271928934, "epoch": 0.8031704095112285, "step": 456}, {"eval_loss": 2.4220566749572754, "eval_runtime": 31.3458, "eval_samples_per_second": 8.295, "eval_steps_per_second": 8.295, "eval_num_tokens": 1888559.0, "eval_mean_token_accuracy": 0.46919269401293534, "epoch": 0.9035667107001321, "step": 513}, {"train_runtime": 1223.3342, "train_samples_per_second": 1.856, "train_steps_per_second": 0.464, "total_flos": 1.2714756435523584e+16, "train_loss": 2.43226547686147, "num_tokens": 2092072.0, "mean_token_accuracy": 0.46868826180207923, "epoch": 1.0, "step": 568}]
|
gemma-news-lora-r16-d05-e2/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/gemma-3-1b-pt
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: gemma-news-lora-r16-d05-e2
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- sft
|
| 8 |
+
- trl
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for gemma-news-lora-r16-d05-e2
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [google/gemma-3-1b-pt](https://huggingface.co/google/gemma-3-1b-pt).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
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?"
|
| 23 |
+
generator = pipeline("text-generation", model="eantropix/gemma-news-lora-r16-d05-e2", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
+
|
| 35 |
+
### Framework versions
|
| 36 |
+
|
| 37 |
+
- TRL: 0.21.0
|
| 38 |
+
- Transformers: 4.57.0
|
| 39 |
+
- Pytorch: 2.8.0
|
| 40 |
+
- Datasets: 3.3.2
|
| 41 |
+
- Tokenizers: 0.22.1
|
| 42 |
+
|
| 43 |
+
## Citations
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
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},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
gemma-news-lora-r16-d05-e2/adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "google/gemma-3-1b-pt",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
+
"fan_in_fan_out": false,
|
| 9 |
+
"inference_mode": true,
|
| 10 |
+
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
+
"layers_pattern": null,
|
| 13 |
+
"layers_to_transform": null,
|
| 14 |
+
"loftq_config": {},
|
| 15 |
+
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
+
"lora_dropout": 0.05,
|
| 18 |
+
"megatron_config": null,
|
| 19 |
+
"megatron_core": "megatron.core",
|
| 20 |
+
"modules_to_save": [
|
| 21 |
+
"lm_head",
|
| 22 |
+
"embed_tokens"
|
| 23 |
+
],
|
| 24 |
+
"peft_type": "LORA",
|
| 25 |
+
"r": 16,
|
| 26 |
+
"rank_pattern": {},
|
| 27 |
+
"revision": null,
|
| 28 |
+
"target_modules": [
|
| 29 |
+
"k_proj",
|
| 30 |
+
"q_proj",
|
| 31 |
+
"o_proj",
|
| 32 |
+
"up_proj",
|
| 33 |
+
"gate_proj",
|
| 34 |
+
"down_proj",
|
| 35 |
+
"v_proj"
|
| 36 |
+
],
|
| 37 |
+
"task_type": "CAUSAL_LM",
|
| 38 |
+
"use_dora": false,
|
| 39 |
+
"use_rslora": false
|
| 40 |
+
}
|
gemma-news-lora-r16-d05-e2/added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
gemma-news-lora-r16-d05-e2/special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
gemma-news-lora-r16-d05-e2/tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
gemma-news-lora-r16-d05-e2/train_log.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"loss": 2.5261, "grad_norm": 1.8401612043380737, "learning_rate": 0.0002, "num_tokens": 3807.0, "mean_token_accuracy": 0.4527951776981354, "epoch": 0.0017613386173491853, "step": 1}, {"eval_loss": 2.4587554931640625, "eval_runtime": 31.3191, "eval_samples_per_second": 8.302, "eval_steps_per_second": 8.302, "eval_num_tokens": 424054.0, "eval_mean_token_accuracy": 0.4643062621355057, "epoch": 0.20079260237780713, "step": 114}, {"loss": 2.4516, "grad_norm": 1.3025959730148315, "learning_rate": 0.0002, "num_tokens": 738884.0, "mean_token_accuracy": 0.4655109086078615, "epoch": 0.3522677234698371, "step": 200}, {"eval_loss": 2.446150064468384, "eval_runtime": 31.3111, "eval_samples_per_second": 8.304, "eval_steps_per_second": 8.304, "eval_num_tokens": 839084.0, "eval_mean_token_accuracy": 0.4655810322899085, "epoch": 0.40158520475561427, "step": 228}, {"eval_loss": 2.4328904151916504, "eval_runtime": 31.2411, "eval_samples_per_second": 8.322, "eval_steps_per_second": 8.322, "eval_num_tokens": 1262092.0, "eval_mean_token_accuracy": 0.4678860610494247, "epoch": 0.6023778071334214, "step": 342}, {"loss": 2.4253, "grad_norm": 1.3167555332183838, "learning_rate": 0.0002, "num_tokens": 1474663.0, "mean_token_accuracy": 0.4697031937167048, "epoch": 0.7045354469396742, "step": 400}, {"eval_loss": 2.4242489337921143, "eval_runtime": 31.2849, "eval_samples_per_second": 8.311, "eval_steps_per_second": 8.311, "eval_num_tokens": 1681400.0, "eval_mean_token_accuracy": 0.46866307109594346, "epoch": 0.8031704095112285, "step": 456}, {"eval_loss": 2.4181556701660156, "eval_runtime": 31.3812, "eval_samples_per_second": 8.285, "eval_steps_per_second": 8.285, "eval_num_tokens": 2099789.0, "eval_mean_token_accuracy": 0.47001705731336885, "epoch": 1.0035226772346983, "step": 570}, {"loss": 2.3568, "grad_norm": 1.6398459672927856, "learning_rate": 0.0002, "num_tokens": 2211854.0, "mean_token_accuracy": 0.47651648719110834, "epoch": 1.056362835755174, "step": 600}, {"eval_loss": 2.4849956035614014, "eval_runtime": 31.3589, "eval_samples_per_second": 8.291, "eval_steps_per_second": 8.291, "eval_num_tokens": 2522674.0, "eval_mean_token_accuracy": 0.4655607200585879, "epoch": 1.2043152796125054, "step": 684}, {"eval_loss": 2.488980770111084, "eval_runtime": 31.2622, "eval_samples_per_second": 8.317, "eval_steps_per_second": 8.317, "eval_num_tokens": 2944288.0, "eval_mean_token_accuracy": 0.4653890137489025, "epoch": 1.4051078819903127, "step": 798}, {"loss": 2.0007, "grad_norm": 1.698367714881897, "learning_rate": 0.0002, "num_tokens": 2951127.0, "mean_token_accuracy": 0.5253972038254142, "epoch": 1.408630559225011, "step": 800}, {"eval_loss": 2.4850845336914062, "eval_runtime": 31.3434, "eval_samples_per_second": 8.295, "eval_steps_per_second": 8.295, "eval_num_tokens": 3365331.0, "eval_mean_token_accuracy": 0.46666846458728495, "epoch": 1.6059004843681197, "step": 912}, {"loss": 2.0214, "grad_norm": 1.5696717500686646, "learning_rate": 0.0002, "num_tokens": 3686897.0, "mean_token_accuracy": 0.5216112550348043, "epoch": 1.760898282694848, "step": 1000}, {"eval_loss": 2.486029624938965, "eval_runtime": 31.3264, "eval_samples_per_second": 8.3, "eval_steps_per_second": 8.3, "eval_num_tokens": 3783054.0, "eval_mean_token_accuracy": 0.46701203550283726, "epoch": 1.806693086745927, "step": 1026}, {"train_runtime": 2168.5887, "train_samples_per_second": 2.094, "train_steps_per_second": 0.524, "total_flos": 2.542951287104717e+16, "train_loss": 2.22611249689485, "num_tokens": 4184144.0, "mean_token_accuracy": 0.5190733696435258, "epoch": 2.0, "step": 1136}]
|
gemma-news-lora-r16-d05-e3/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/gemma-3-1b-pt
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: gemma-news-lora-r16-d05-e3
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- sft
|
| 8 |
+
- trl
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for gemma-news-lora-r16-d05-e3
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [google/gemma-3-1b-pt](https://huggingface.co/google/gemma-3-1b-pt).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
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?"
|
| 23 |
+
generator = pipeline("text-generation", model="eantropix/gemma-news-lora-r16-d05-e3", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
+
|
| 35 |
+
### Framework versions
|
| 36 |
+
|
| 37 |
+
- TRL: 0.21.0
|
| 38 |
+
- Transformers: 4.57.0
|
| 39 |
+
- Pytorch: 2.8.0
|
| 40 |
+
- Datasets: 3.3.2
|
| 41 |
+
- Tokenizers: 0.22.1
|
| 42 |
+
|
| 43 |
+
## Citations
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
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},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
gemma-news-lora-r16-d05-e3/adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "google/gemma-3-1b-pt",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
+
"fan_in_fan_out": false,
|
| 9 |
+
"inference_mode": true,
|
| 10 |
+
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
+
"layers_pattern": null,
|
| 13 |
+
"layers_to_transform": null,
|
| 14 |
+
"loftq_config": {},
|
| 15 |
+
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
+
"lora_dropout": 0.05,
|
| 18 |
+
"megatron_config": null,
|
| 19 |
+
"megatron_core": "megatron.core",
|
| 20 |
+
"modules_to_save": [
|
| 21 |
+
"lm_head",
|
| 22 |
+
"embed_tokens"
|
| 23 |
+
],
|
| 24 |
+
"peft_type": "LORA",
|
| 25 |
+
"r": 16,
|
| 26 |
+
"rank_pattern": {},
|
| 27 |
+
"revision": null,
|
| 28 |
+
"target_modules": [
|
| 29 |
+
"k_proj",
|
| 30 |
+
"q_proj",
|
| 31 |
+
"o_proj",
|
| 32 |
+
"up_proj",
|
| 33 |
+
"gate_proj",
|
| 34 |
+
"down_proj",
|
| 35 |
+
"v_proj"
|
| 36 |
+
],
|
| 37 |
+
"task_type": "CAUSAL_LM",
|
| 38 |
+
"use_dora": false,
|
| 39 |
+
"use_rslora": false
|
| 40 |
+
}
|
gemma-news-lora-r16-d05-e3/added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
gemma-news-lora-r16-d05-e3/special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
gemma-news-lora-r16-d05-e3/tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
gemma-news-lora-r16-d05-e3/train_log.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"loss": 2.5261, "grad_norm": 1.8400886058807373, "learning_rate": 0.0002, "num_tokens": 3807.0, "mean_token_accuracy": 0.4527951776981354, "epoch": 0.0017613386173491853, "step": 1}, {"eval_loss": 2.4492335319519043, "eval_runtime": 31.3316, "eval_samples_per_second": 8.298, "eval_steps_per_second": 8.298, "eval_num_tokens": 633043.0, "eval_mean_token_accuracy": 0.46521867868992, "epoch": 0.3011889035667107, "step": 171}, {"loss": 2.4517, "grad_norm": 1.294639229774475, "learning_rate": 0.0002, "num_tokens": 738884.0, "mean_token_accuracy": 0.46555870277198713, "epoch": 0.3522677234698371, "step": 200}, {"eval_loss": 2.4334323406219482, "eval_runtime": 31.2294, "eval_samples_per_second": 8.325, "eval_steps_per_second": 8.325, "eval_num_tokens": 1262092.0, "eval_mean_token_accuracy": 0.46769868227151723, "epoch": 0.6023778071334214, "step": 342}, {"loss": 2.4253, "grad_norm": 1.3159247636795044, "learning_rate": 0.0002, "num_tokens": 1474663.0, "mean_token_accuracy": 0.47003855984658005, "epoch": 0.7045354469396742, "step": 400}, {"eval_loss": 2.4219868183135986, "eval_runtime": 31.3272, "eval_samples_per_second": 8.299, "eval_steps_per_second": 8.299, "eval_num_tokens": 1888559.0, "eval_mean_token_accuracy": 0.4687093767982263, "epoch": 0.9035667107001321, "step": 513}, {"loss": 2.3567, "grad_norm": 1.6573864221572876, "learning_rate": 0.0002, "num_tokens": 2211854.0, "mean_token_accuracy": 0.4764365223009088, "epoch": 1.056362835755174, "step": 600}, {"eval_loss": 2.485003709793091, "eval_runtime": 31.3237, "eval_samples_per_second": 8.3, "eval_steps_per_second": 8.3, "eval_num_tokens": 2522674.0, "eval_mean_token_accuracy": 0.4652870142689118, "epoch": 1.2043152796125054, "step": 684}, {"loss": 2.0006, "grad_norm": 1.6752076148986816, "learning_rate": 0.0002, "num_tokens": 2951127.0, "mean_token_accuracy": 0.5257703534141183, "epoch": 1.408630559225011, "step": 800}, {"eval_loss": 2.4829509258270264, "eval_runtime": 31.3522, "eval_samples_per_second": 8.293, "eval_steps_per_second": 8.293, "eval_num_tokens": 3153621.0, "eval_mean_token_accuracy": 0.46557407333300665, "epoch": 1.5055041831792162, "step": 855}, {"loss": 2.0213, "grad_norm": 1.58756685256958, "learning_rate": 0.0002, "num_tokens": 3686897.0, "mean_token_accuracy": 0.5215539345145226, "epoch": 1.760898282694848, "step": 1000}, {"eval_loss": 2.4844696521759033, "eval_runtime": 31.2797, "eval_samples_per_second": 8.312, "eval_steps_per_second": 8.312, "eval_num_tokens": 3783054.0, "eval_mean_token_accuracy": 0.46690672441170766, "epoch": 1.806693086745927, "step": 1026}, {"eval_loss": 2.634779930114746, "eval_runtime": 31.3637, "eval_samples_per_second": 8.29, "eval_steps_per_second": 8.29, "eval_num_tokens": 4411369.0, "eval_mean_token_accuracy": 0.45948662620324354, "epoch": 2.1074416556583, "step": 1197}, {"loss": 1.9139, "grad_norm": 1.7557955980300903, "learning_rate": 0.0002, "num_tokens": 4421680.0, "mean_token_accuracy": 0.5412625178825273, "epoch": 2.112725671510348, "step": 1200}, {"eval_loss": 2.654599905014038, "eval_runtime": 31.3195, "eval_samples_per_second": 8.302, "eval_steps_per_second": 8.302, "eval_num_tokens": 5042684.0, "eval_mean_token_accuracy": 0.45912633056824026, "epoch": 2.408630559225011, "step": 1368}, {"loss": 1.667, "grad_norm": 1.8569022417068481, "learning_rate": 0.0002, "num_tokens": 5161656.0, "mean_token_accuracy": 0.5834766869619489, "epoch": 2.4649933949801848, "step": 1400}, {"eval_loss": 2.6626200675964355, "eval_runtime": 31.3521, "eval_samples_per_second": 8.293, "eval_steps_per_second": 8.293, "eval_num_tokens": 5672906.0, "eval_mean_token_accuracy": 0.4595652713225438, "epoch": 2.709819462791722, "step": 1539}, {"loss": 1.683, "grad_norm": 1.735725998878479, "learning_rate": 0.0002, "num_tokens": 5895918.0, "mean_token_accuracy": 0.5792835601791739, "epoch": 2.817261118450022, "step": 1600}, {"train_runtime": 3116.4907, "train_samples_per_second": 2.186, "train_steps_per_second": 0.547, "total_flos": 3.814426930657075e+16, "train_loss": 2.042536048402249, "num_tokens": 6276216.0, "mean_token_accuracy": 0.5765919059874064, "epoch": 3.0, "step": 1704}]
|
gemma-news-lora-r16-d10-e3/adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "google/gemma-3-1b-pt",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
+
"fan_in_fan_out": false,
|
| 9 |
+
"inference_mode": true,
|
| 10 |
+
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
+
"layers_pattern": null,
|
| 13 |
+
"layers_to_transform": null,
|
| 14 |
+
"loftq_config": {},
|
| 15 |
+
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
+
"lora_dropout": 0.1,
|
| 18 |
+
"megatron_config": null,
|
| 19 |
+
"megatron_core": "megatron.core",
|
| 20 |
+
"modules_to_save": [
|
| 21 |
+
"lm_head",
|
| 22 |
+
"embed_tokens"
|
| 23 |
+
],
|
| 24 |
+
"peft_type": "LORA",
|
| 25 |
+
"r": 16,
|
| 26 |
+
"rank_pattern": {},
|
| 27 |
+
"revision": null,
|
| 28 |
+
"target_modules": [
|
| 29 |
+
"k_proj",
|
| 30 |
+
"q_proj",
|
| 31 |
+
"o_proj",
|
| 32 |
+
"up_proj",
|
| 33 |
+
"gate_proj",
|
| 34 |
+
"down_proj",
|
| 35 |
+
"v_proj"
|
| 36 |
+
],
|
| 37 |
+
"task_type": "CAUSAL_LM",
|
| 38 |
+
"use_dora": false,
|
| 39 |
+
"use_rslora": false
|
| 40 |
+
}
|
gemma-news-lora-r16-d10-e3/train_log.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"loss": 2.5261, "grad_norm": 1.8407647609710693, "learning_rate": 0.0002, "num_tokens": 3807.0, "mean_token_accuracy": 0.4527951776981354, "epoch": 0.0017613386173491853, "step": 1}, {"eval_loss": 2.449199914932251, "eval_runtime": 31.341, "eval_samples_per_second": 8.296, "eval_steps_per_second": 8.296, "eval_num_tokens": 633043.0, "eval_mean_token_accuracy": 0.465430613893729, "epoch": 0.3011889035667107, "step": 171}, {"loss": 2.4519, "grad_norm": 1.2951916456222534, "learning_rate": 0.0002, "num_tokens": 738884.0, "mean_token_accuracy": 0.4655279368536556, "epoch": 0.3522677234698371, "step": 200}, {"eval_loss": 2.433823585510254, "eval_runtime": 31.3305, "eval_samples_per_second": 8.299, "eval_steps_per_second": 8.299, "eval_num_tokens": 1262092.0, "eval_mean_token_accuracy": 0.4674558753004441, "epoch": 0.6023778071334214, "step": 342}, {"loss": 2.4256, "grad_norm": 1.3150253295898438, "learning_rate": 0.0002, "num_tokens": 1474663.0, "mean_token_accuracy": 0.46991954278200865, "epoch": 0.7045354469396742, "step": 400}, {"eval_loss": 2.4220340251922607, "eval_runtime": 31.348, "eval_samples_per_second": 8.294, "eval_steps_per_second": 8.294, "eval_num_tokens": 1888559.0, "eval_mean_token_accuracy": 0.4690395752970989, "epoch": 0.9035667107001321, "step": 513}, {"loss": 2.3579, "grad_norm": 1.6579958200454712, "learning_rate": 0.0002, "num_tokens": 2211854.0, "mean_token_accuracy": 0.47609980570359883, "epoch": 1.056362835755174, "step": 600}, {"eval_loss": 2.4849064350128174, "eval_runtime": 31.2971, "eval_samples_per_second": 8.307, "eval_steps_per_second": 8.307, "eval_num_tokens": 2522674.0, "eval_mean_token_accuracy": 0.4652225395807853, "epoch": 1.2043152796125054, "step": 684}, {"loss": 2.0024, "grad_norm": 1.65996253490448, "learning_rate": 0.0002, "num_tokens": 2951127.0, "mean_token_accuracy": 0.525515789873898, "epoch": 1.408630559225011, "step": 800}, {"eval_loss": 2.482985258102417, "eval_runtime": 31.3526, "eval_samples_per_second": 8.293, "eval_steps_per_second": 8.293, "eval_num_tokens": 3153621.0, "eval_mean_token_accuracy": 0.46558210471501715, "epoch": 1.5055041831792162, "step": 855}, {"loss": 2.024, "grad_norm": 1.5773121118545532, "learning_rate": 0.0002, "num_tokens": 3686897.0, "mean_token_accuracy": 0.520905781686306, "epoch": 1.760898282694848, "step": 1000}, {"eval_loss": 2.484497308731079, "eval_runtime": 31.3494, "eval_samples_per_second": 8.294, "eval_steps_per_second": 8.294, "eval_num_tokens": 3783054.0, "eval_mean_token_accuracy": 0.4670998099904794, "epoch": 1.806693086745927, "step": 1026}, {"eval_loss": 2.6325812339782715, "eval_runtime": 31.3553, "eval_samples_per_second": 8.292, "eval_steps_per_second": 8.292, "eval_num_tokens": 4411369.0, "eval_mean_token_accuracy": 0.4597395339837441, "epoch": 2.1074416556583, "step": 1197}, {"loss": 1.9158, "grad_norm": 1.7478151321411133, "learning_rate": 0.0002, "num_tokens": 4421680.0, "mean_token_accuracy": 0.540607942993262, "epoch": 2.112725671510348, "step": 1200}, {"eval_loss": 2.6467721462249756, "eval_runtime": 31.3515, "eval_samples_per_second": 8.293, "eval_steps_per_second": 8.293, "eval_num_tokens": 5042684.0, "eval_mean_token_accuracy": 0.45865683486828435, "epoch": 2.408630559225011, "step": 1368}, {"loss": 1.6742, "grad_norm": 1.8657821416854858, "learning_rate": 0.0002, "num_tokens": 5161656.0, "mean_token_accuracy": 0.5820470756664872, "epoch": 2.4649933949801848, "step": 1400}, {"eval_loss": 2.661668539047241, "eval_runtime": 31.3383, "eval_samples_per_second": 8.297, "eval_steps_per_second": 8.297, "eval_num_tokens": 5672906.0, "eval_mean_token_accuracy": 0.4594825219649535, "epoch": 2.709819462791722, "step": 1539}, {"loss": 1.6889, "grad_norm": 1.738574504852295, "learning_rate": 0.0002, "num_tokens": 5895918.0, "mean_token_accuracy": 0.5781174439564347, "epoch": 2.817261118450022, "step": 1600}, {"train_runtime": 3114.4669, "train_samples_per_second": 2.188, "train_steps_per_second": 0.547, "total_flos": 3.814426930657075e+16, "train_loss": 2.0454643389708558, "num_tokens": 6276216.0, "mean_token_accuracy": 0.5747887128806975, "epoch": 3.0, "step": 1704}]
|
gemma-news-lora-r32-d01-e3/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/gemma-3-1b-pt
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: gemma-news-lora-r32-d01-e3
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- sft
|
| 8 |
+
- trl
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for gemma-news-lora-r32-d01-e3
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [google/gemma-3-1b-pt](https://huggingface.co/google/gemma-3-1b-pt).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
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?"
|
| 23 |
+
generator = pipeline("text-generation", model="eantropix/gemma-news-lora-r32-d01-e3", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
+
|
| 35 |
+
### Framework versions
|
| 36 |
+
|
| 37 |
+
- TRL: 0.21.0
|
| 38 |
+
- Transformers: 4.57.0
|
| 39 |
+
- Pytorch: 2.8.0
|
| 40 |
+
- Datasets: 3.3.2
|
| 41 |
+
- Tokenizers: 0.22.1
|
| 42 |
+
|
| 43 |
+
## Citations
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
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},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
gemma-news-lora-r32-d01-e3/adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "google/gemma-3-1b-pt",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
+
"fan_in_fan_out": false,
|
| 9 |
+
"inference_mode": true,
|
| 10 |
+
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
+
"layers_pattern": null,
|
| 13 |
+
"layers_to_transform": null,
|
| 14 |
+
"loftq_config": {},
|
| 15 |
+
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
+
"lora_dropout": 0.01,
|
| 18 |
+
"megatron_config": null,
|
| 19 |
+
"megatron_core": "megatron.core",
|
| 20 |
+
"modules_to_save": [
|
| 21 |
+
"lm_head",
|
| 22 |
+
"embed_tokens"
|
| 23 |
+
],
|
| 24 |
+
"peft_type": "LORA",
|
| 25 |
+
"r": 32,
|
| 26 |
+
"rank_pattern": {},
|
| 27 |
+
"revision": null,
|
| 28 |
+
"target_modules": [
|
| 29 |
+
"k_proj",
|
| 30 |
+
"q_proj",
|
| 31 |
+
"o_proj",
|
| 32 |
+
"up_proj",
|
| 33 |
+
"gate_proj",
|
| 34 |
+
"down_proj",
|
| 35 |
+
"v_proj"
|
| 36 |
+
],
|
| 37 |
+
"task_type": "CAUSAL_LM",
|
| 38 |
+
"use_dora": false,
|
| 39 |
+
"use_rslora": false
|
| 40 |
+
}
|
gemma-news-lora-r32-d01-e3/added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
gemma-news-lora-r32-d01-e3/special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
gemma-news-lora-r32-d01-e3/tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
gemma-news-lora-r32-d01-e3/train_log.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"loss": 2.5261, "grad_norm": 1.8296067714691162, "learning_rate": 0.0002, "num_tokens": 3807.0, "mean_token_accuracy": 0.4527951776981354, "epoch": 0.0017613386173491853, "step": 1}, {"eval_loss": 2.449526309967041, "eval_runtime": 31.5084, "eval_samples_per_second": 8.252, "eval_steps_per_second": 8.252, "eval_num_tokens": 633043.0, "eval_mean_token_accuracy": 0.46524248249255695, "epoch": 0.3011889035667107, "step": 171}, {"loss": 2.4516, "grad_norm": 1.2850573062896729, "learning_rate": 0.0002, "num_tokens": 738884.0, "mean_token_accuracy": 0.46545252784262947, "epoch": 0.3522677234698371, "step": 200}, {"eval_loss": 2.433289051055908, "eval_runtime": 31.5361, "eval_samples_per_second": 8.245, "eval_steps_per_second": 8.245, "eval_num_tokens": 1262092.0, "eval_mean_token_accuracy": 0.4677540884568141, "epoch": 0.6023778071334214, "step": 342}, {"loss": 2.425, "grad_norm": 1.2776185274124146, "learning_rate": 0.0002, "num_tokens": 1474663.0, "mean_token_accuracy": 0.46985133692622183, "epoch": 0.7045354469396742, "step": 400}, {"eval_loss": 2.4216153621673584, "eval_runtime": 31.5503, "eval_samples_per_second": 8.241, "eval_steps_per_second": 8.241, "eval_num_tokens": 1888559.0, "eval_mean_token_accuracy": 0.46888203563598485, "epoch": 0.9035667107001321, "step": 513}, {"loss": 2.3567, "grad_norm": 1.629874348640442, "learning_rate": 0.0002, "num_tokens": 2211854.0, "mean_token_accuracy": 0.4763861690952124, "epoch": 1.056362835755174, "step": 600}, {"eval_loss": 2.4857680797576904, "eval_runtime": 31.5368, "eval_samples_per_second": 8.244, "eval_steps_per_second": 8.244, "eval_num_tokens": 2522674.0, "eval_mean_token_accuracy": 0.46543952971696856, "epoch": 1.2043152796125054, "step": 684}, {"loss": 1.9965, "grad_norm": 1.8664926290512085, "learning_rate": 0.0002, "num_tokens": 2951127.0, "mean_token_accuracy": 0.5261317719519139, "epoch": 1.408630559225011, "step": 800}, {"eval_loss": 2.4817824363708496, "eval_runtime": 31.5503, "eval_samples_per_second": 8.241, "eval_steps_per_second": 8.241, "eval_num_tokens": 3153621.0, "eval_mean_token_accuracy": 0.4659228702004139, "epoch": 1.5055041831792162, "step": 855}, {"loss": 2.0164, "grad_norm": 1.5478402376174927, "learning_rate": 0.0002, "num_tokens": 3686897.0, "mean_token_accuracy": 0.5220875688269735, "epoch": 1.760898282694848, "step": 1000}, {"eval_loss": 2.486830949783325, "eval_runtime": 31.5306, "eval_samples_per_second": 8.246, "eval_steps_per_second": 8.246, "eval_num_tokens": 3783054.0, "eval_mean_token_accuracy": 0.46644272517699464, "epoch": 1.806693086745927, "step": 1026}, {"eval_loss": 2.636293888092041, "eval_runtime": 31.5419, "eval_samples_per_second": 8.243, "eval_steps_per_second": 8.243, "eval_num_tokens": 4411369.0, "eval_mean_token_accuracy": 0.45982755491366756, "epoch": 2.1074416556583, "step": 1197}, {"loss": 1.9038, "grad_norm": 1.7402507066726685, "learning_rate": 0.0002, "num_tokens": 4421680.0, "mean_token_accuracy": 0.5429751234821444, "epoch": 2.112725671510348, "step": 1200}, {"eval_loss": 2.659405469894409, "eval_runtime": 31.5373, "eval_samples_per_second": 8.244, "eval_steps_per_second": 8.244, "eval_num_tokens": 5042684.0, "eval_mean_token_accuracy": 0.4590030080997027, "epoch": 2.408630559225011, "step": 1368}, {"loss": 1.6494, "grad_norm": 1.8215879201889038, "learning_rate": 0.0002, "num_tokens": 5161656.0, "mean_token_accuracy": 0.5873104107379913, "epoch": 2.4649933949801848, "step": 1400}, {"eval_loss": 2.6638920307159424, "eval_runtime": 31.5288, "eval_samples_per_second": 8.246, "eval_steps_per_second": 8.246, "eval_num_tokens": 5672906.0, "eval_mean_token_accuracy": 0.4594049458320324, "epoch": 2.709819462791722, "step": 1539}, {"loss": 1.6611, "grad_norm": 1.7418580055236816, "learning_rate": 0.0002, "num_tokens": 5895918.0, "mean_token_accuracy": 0.5831968970969319, "epoch": 2.817261118450022, "step": 1600}, {"train_runtime": 3140.8432, "train_samples_per_second": 2.169, "train_steps_per_second": 0.543, "total_flos": 3.863553735243571e+16, "train_loss": 2.0341938158995667, "num_tokens": 6276216.0, "mean_token_accuracy": 0.580950532907463, "epoch": 3.0, "step": 1704}]
|
gemma-news-lora-r32-d05-e2/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/gemma-3-1b-pt
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: gemma-news-lora-r32-d05-e2
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- sft
|
| 8 |
+
- trl
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for gemma-news-lora-r32-d05-e2
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [google/gemma-3-1b-pt](https://huggingface.co/google/gemma-3-1b-pt).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
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?"
|
| 23 |
+
generator = pipeline("text-generation", model="eantropix/gemma-news-lora-r32-d05-e2", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
+
|
| 35 |
+
### Framework versions
|
| 36 |
+
|
| 37 |
+
- TRL: 0.21.0
|
| 38 |
+
- Transformers: 4.57.0
|
| 39 |
+
- Pytorch: 2.8.0
|
| 40 |
+
- Datasets: 3.3.2
|
| 41 |
+
- Tokenizers: 0.22.1
|
| 42 |
+
|
| 43 |
+
## Citations
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
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},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
gemma-news-lora-r32-d05-e2/adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "google/gemma-3-1b-pt",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
+
"fan_in_fan_out": false,
|
| 9 |
+
"inference_mode": true,
|
| 10 |
+
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
+
"layers_pattern": null,
|
| 13 |
+
"layers_to_transform": null,
|
| 14 |
+
"loftq_config": {},
|
| 15 |
+
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
+
"lora_dropout": 0.05,
|
| 18 |
+
"megatron_config": null,
|
| 19 |
+
"megatron_core": "megatron.core",
|
| 20 |
+
"modules_to_save": [
|
| 21 |
+
"lm_head",
|
| 22 |
+
"embed_tokens"
|
| 23 |
+
],
|
| 24 |
+
"peft_type": "LORA",
|
| 25 |
+
"r": 32,
|
| 26 |
+
"rank_pattern": {},
|
| 27 |
+
"revision": null,
|
| 28 |
+
"target_modules": [
|
| 29 |
+
"k_proj",
|
| 30 |
+
"q_proj",
|
| 31 |
+
"o_proj",
|
| 32 |
+
"up_proj",
|
| 33 |
+
"gate_proj",
|
| 34 |
+
"down_proj",
|
| 35 |
+
"v_proj"
|
| 36 |
+
],
|
| 37 |
+
"task_type": "CAUSAL_LM",
|
| 38 |
+
"use_dora": false,
|
| 39 |
+
"use_rslora": false
|
| 40 |
+
}
|
gemma-news-lora-r32-d05-e2/added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
gemma-news-lora-r32-d05-e2/special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
gemma-news-lora-r32-d05-e2/tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
gemma-news-lora-r32-d05-e2/train_log.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"loss": 2.5261, "grad_norm": 1.82986319065094, "learning_rate": 0.0002, "num_tokens": 3807.0, "mean_token_accuracy": 0.4527951776981354, "epoch": 0.0017613386173491853, "step": 1}, {"eval_loss": 2.4590327739715576, "eval_runtime": 31.4466, "eval_samples_per_second": 8.268, "eval_steps_per_second": 8.268, "eval_num_tokens": 424054.0, "eval_mean_token_accuracy": 0.4643992467568471, "epoch": 0.20079260237780713, "step": 114}, {"loss": 2.452, "grad_norm": 1.2841460704803467, "learning_rate": 0.0002, "num_tokens": 738884.0, "mean_token_accuracy": 0.46548524498939514, "epoch": 0.3522677234698371, "step": 200}, {"eval_loss": 2.4462053775787354, "eval_runtime": 31.4526, "eval_samples_per_second": 8.266, "eval_steps_per_second": 8.266, "eval_num_tokens": 839084.0, "eval_mean_token_accuracy": 0.4656811935397295, "epoch": 0.40158520475561427, "step": 228}, {"eval_loss": 2.4334702491760254, "eval_runtime": 31.4321, "eval_samples_per_second": 8.272, "eval_steps_per_second": 8.272, "eval_num_tokens": 1262092.0, "eval_mean_token_accuracy": 0.46755366577551916, "epoch": 0.6023778071334214, "step": 342}, {"loss": 2.4254, "grad_norm": 1.2856773138046265, "learning_rate": 0.0002, "num_tokens": 1474663.0, "mean_token_accuracy": 0.46989184491336344, "epoch": 0.7045354469396742, "step": 400}, {"eval_loss": 2.424654722213745, "eval_runtime": 31.5084, "eval_samples_per_second": 8.252, "eval_steps_per_second": 8.252, "eval_num_tokens": 1681400.0, "eval_mean_token_accuracy": 0.468539125758868, "epoch": 0.8031704095112285, "step": 456}, {"eval_loss": 2.418168783187866, "eval_runtime": 31.5407, "eval_samples_per_second": 8.243, "eval_steps_per_second": 8.243, "eval_num_tokens": 2099789.0, "eval_mean_token_accuracy": 0.4696115906421955, "epoch": 1.0035226772346983, "step": 570}, {"loss": 2.3559, "grad_norm": 1.6307997703552246, "learning_rate": 0.0002, "num_tokens": 2211854.0, "mean_token_accuracy": 0.4766515272579742, "epoch": 1.056362835755174, "step": 600}, {"eval_loss": 2.484760284423828, "eval_runtime": 31.5035, "eval_samples_per_second": 8.253, "eval_steps_per_second": 8.253, "eval_num_tokens": 2522674.0, "eval_mean_token_accuracy": 0.4652517632796214, "epoch": 1.2043152796125054, "step": 684}, {"eval_loss": 2.487440824508667, "eval_runtime": 31.5203, "eval_samples_per_second": 8.249, "eval_steps_per_second": 8.249, "eval_num_tokens": 2944288.0, "eval_mean_token_accuracy": 0.46554745045992046, "epoch": 1.4051078819903127, "step": 798}, {"loss": 1.9976, "grad_norm": 1.6280224323272705, "learning_rate": 0.0002, "num_tokens": 2951127.0, "mean_token_accuracy": 0.5262961225956678, "epoch": 1.408630559225011, "step": 800}, {"eval_loss": 2.4825246334075928, "eval_runtime": 31.5293, "eval_samples_per_second": 8.246, "eval_steps_per_second": 8.246, "eval_num_tokens": 3365331.0, "eval_mean_token_accuracy": 0.46678007955734546, "epoch": 1.6059004843681197, "step": 912}, {"loss": 2.0177, "grad_norm": 1.550522804260254, "learning_rate": 0.0002, "num_tokens": 3686897.0, "mean_token_accuracy": 0.5221091748401523, "epoch": 1.760898282694848, "step": 1000}, {"eval_loss": 2.486112594604492, "eval_runtime": 31.4976, "eval_samples_per_second": 8.255, "eval_steps_per_second": 8.255, "eval_num_tokens": 3783054.0, "eval_mean_token_accuracy": 0.467052788573962, "epoch": 1.806693086745927, "step": 1026}, {"train_runtime": 2185.6086, "train_samples_per_second": 2.078, "train_steps_per_second": 0.52, "total_flos": 2.575702490162381e+16, "train_loss": 2.2242365523543155, "num_tokens": 4184144.0, "mean_token_accuracy": 0.5199301563354267, "epoch": 2.0, "step": 1136}]
|
gemma-news-lora-r32-d05-e3/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/gemma-3-1b-pt
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: gemma-news-lora-r32-d05-e3
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- sft
|
| 8 |
+
- trl
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for gemma-news-lora-r32-d05-e3
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [google/gemma-3-1b-pt](https://huggingface.co/google/gemma-3-1b-pt).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
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?"
|
| 23 |
+
generator = pipeline("text-generation", model="eantropix/gemma-news-lora-r32-d05-e3", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
+
|
| 35 |
+
### Framework versions
|
| 36 |
+
|
| 37 |
+
- TRL: 0.21.0
|
| 38 |
+
- Transformers: 4.57.0
|
| 39 |
+
- Pytorch: 2.8.0
|
| 40 |
+
- Datasets: 3.3.2
|
| 41 |
+
- Tokenizers: 0.22.1
|
| 42 |
+
|
| 43 |
+
## Citations
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
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},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
gemma-news-lora-r32-d05-e3/adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "google/gemma-3-1b-pt",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
+
"fan_in_fan_out": false,
|
| 9 |
+
"inference_mode": true,
|
| 10 |
+
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
+
"layers_pattern": null,
|
| 13 |
+
"layers_to_transform": null,
|
| 14 |
+
"loftq_config": {},
|
| 15 |
+
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
+
"lora_dropout": 0.05,
|
| 18 |
+
"megatron_config": null,
|
| 19 |
+
"megatron_core": "megatron.core",
|
| 20 |
+
"modules_to_save": [
|
| 21 |
+
"lm_head",
|
| 22 |
+
"embed_tokens"
|
| 23 |
+
],
|
| 24 |
+
"peft_type": "LORA",
|
| 25 |
+
"r": 32,
|
| 26 |
+
"rank_pattern": {},
|
| 27 |
+
"revision": null,
|
| 28 |
+
"target_modules": [
|
| 29 |
+
"k_proj",
|
| 30 |
+
"q_proj",
|
| 31 |
+
"o_proj",
|
| 32 |
+
"up_proj",
|
| 33 |
+
"gate_proj",
|
| 34 |
+
"down_proj",
|
| 35 |
+
"v_proj"
|
| 36 |
+
],
|
| 37 |
+
"task_type": "CAUSAL_LM",
|
| 38 |
+
"use_dora": false,
|
| 39 |
+
"use_rslora": false
|
| 40 |
+
}
|
gemma-news-lora-r32-d05-e3/added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
gemma-news-lora-r32-d05-e3/special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
gemma-news-lora-r32-d05-e3/tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
gemma-news-lora-r32-d05-e3/train_log.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"loss": 2.5261, "grad_norm": 1.8298414945602417, "learning_rate": 0.0002, "num_tokens": 3807.0, "mean_token_accuracy": 0.4527951776981354, "epoch": 0.0017613386173491853, "step": 1}, {"eval_loss": 2.449490547180176, "eval_runtime": 31.5342, "eval_samples_per_second": 8.245, "eval_steps_per_second": 8.245, "eval_num_tokens": 633043.0, "eval_mean_token_accuracy": 0.465292405967529, "epoch": 0.3011889035667107, "step": 171}, {"loss": 2.4515, "grad_norm": 1.276441216468811, "learning_rate": 0.0002, "num_tokens": 738884.0, "mean_token_accuracy": 0.465596117453659, "epoch": 0.3522677234698371, "step": 200}, {"eval_loss": 2.4335553646087646, "eval_runtime": 31.5549, "eval_samples_per_second": 8.24, "eval_steps_per_second": 8.24, "eval_num_tokens": 1262092.0, "eval_mean_token_accuracy": 0.4676352906685609, "epoch": 0.6023778071334214, "step": 342}, {"loss": 2.4251, "grad_norm": 1.2840945720672607, "learning_rate": 0.0002, "num_tokens": 1474663.0, "mean_token_accuracy": 0.4698728785663843, "epoch": 0.7045354469396742, "step": 400}, {"eval_loss": 2.4216582775115967, "eval_runtime": 31.5505, "eval_samples_per_second": 8.241, "eval_steps_per_second": 8.241, "eval_num_tokens": 1888559.0, "eval_mean_token_accuracy": 0.46893568394275814, "epoch": 0.9035667107001321, "step": 513}, {"loss": 2.3562, "grad_norm": 1.6157748699188232, "learning_rate": 0.0002, "num_tokens": 2211854.0, "mean_token_accuracy": 0.4764382596755953, "epoch": 1.056362835755174, "step": 600}, {"eval_loss": 2.485022783279419, "eval_runtime": 31.5554, "eval_samples_per_second": 8.239, "eval_steps_per_second": 8.239, "eval_num_tokens": 2522674.0, "eval_mean_token_accuracy": 0.4652408759181316, "epoch": 1.2043152796125054, "step": 684}, {"loss": 1.9979, "grad_norm": 1.6460187435150146, "learning_rate": 0.0002, "num_tokens": 2951127.0, "mean_token_accuracy": 0.5257650049030781, "epoch": 1.408630559225011, "step": 800}, {"eval_loss": 2.48252272605896, "eval_runtime": 31.5386, "eval_samples_per_second": 8.244, "eval_steps_per_second": 8.244, "eval_num_tokens": 3153621.0, "eval_mean_token_accuracy": 0.4659111173107074, "epoch": 1.5055041831792162, "step": 855}, {"loss": 2.0181, "grad_norm": 1.54988431930542, "learning_rate": 0.0002, "num_tokens": 3686897.0, "mean_token_accuracy": 0.5217732667550444, "epoch": 1.760898282694848, "step": 1000}, {"eval_loss": 2.4851694107055664, "eval_runtime": 31.573, "eval_samples_per_second": 8.235, "eval_steps_per_second": 8.235, "eval_num_tokens": 3783054.0, "eval_mean_token_accuracy": 0.4670427218079567, "epoch": 1.806693086745927, "step": 1026}, {"eval_loss": 2.63089919090271, "eval_runtime": 31.5421, "eval_samples_per_second": 8.243, "eval_steps_per_second": 8.243, "eval_num_tokens": 4411369.0, "eval_mean_token_accuracy": 0.4600042529977285, "epoch": 2.1074416556583, "step": 1197}, {"loss": 1.9069, "grad_norm": 1.7228800058364868, "learning_rate": 0.0002, "num_tokens": 4421680.0, "mean_token_accuracy": 0.5424685461798657, "epoch": 2.112725671510348, "step": 1200}, {"eval_loss": 2.6545791625976562, "eval_runtime": 31.4781, "eval_samples_per_second": 8.26, "eval_steps_per_second": 8.26, "eval_num_tokens": 5042684.0, "eval_mean_token_accuracy": 0.45919388498251257, "epoch": 2.408630559225011, "step": 1368}, {"loss": 1.6525, "grad_norm": 1.794958472251892, "learning_rate": 0.0002, "num_tokens": 5161656.0, "mean_token_accuracy": 0.5865972365066409, "epoch": 2.4649933949801848, "step": 1400}, {"eval_loss": 2.6709418296813965, "eval_runtime": 31.5377, "eval_samples_per_second": 8.244, "eval_steps_per_second": 8.244, "eval_num_tokens": 5672906.0, "eval_mean_token_accuracy": 0.45935866912970175, "epoch": 2.709819462791722, "step": 1539}, {"loss": 1.6643, "grad_norm": 1.6901966333389282, "learning_rate": 0.0002, "num_tokens": 5895918.0, "mean_token_accuracy": 0.582775524109602, "epoch": 2.817261118450022, "step": 1600}, {"train_runtime": 3141.5139, "train_samples_per_second": 2.169, "train_steps_per_second": 0.542, "total_flos": 3.863553735243571e+16, "train_loss": 2.035871942418282, "num_tokens": 6276216.0, "mean_token_accuracy": 0.5799783259989267, "epoch": 3.0, "step": 1704}]
|
gemma-news-lora-r64-d05-e3/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/gemma-3-1b-pt
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: gemma-news-lora-r64-d05-e3
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- sft
|
| 8 |
+
- trl
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for gemma-news-lora-r64-d05-e3
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [google/gemma-3-1b-pt](https://huggingface.co/google/gemma-3-1b-pt).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
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?"
|
| 23 |
+
generator = pipeline("text-generation", model="eantropix/gemma-news-lora-r64-d05-e3", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
+
|
| 35 |
+
### Framework versions
|
| 36 |
+
|
| 37 |
+
- TRL: 0.21.0
|
| 38 |
+
- Transformers: 4.57.0
|
| 39 |
+
- Pytorch: 2.8.0
|
| 40 |
+
- Datasets: 3.3.2
|
| 41 |
+
- Tokenizers: 0.22.1
|
| 42 |
+
|
| 43 |
+
## Citations
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
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},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
gemma-news-lora-r64-d05-e3/adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "google/gemma-3-1b-pt",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
+
"fan_in_fan_out": false,
|
| 9 |
+
"inference_mode": true,
|
| 10 |
+
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
+
"layers_pattern": null,
|
| 13 |
+
"layers_to_transform": null,
|
| 14 |
+
"loftq_config": {},
|
| 15 |
+
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
+
"lora_dropout": 0.05,
|
| 18 |
+
"megatron_config": null,
|
| 19 |
+
"megatron_core": "megatron.core",
|
| 20 |
+
"modules_to_save": [
|
| 21 |
+
"lm_head",
|
| 22 |
+
"embed_tokens"
|
| 23 |
+
],
|
| 24 |
+
"peft_type": "LORA",
|
| 25 |
+
"r": 64,
|
| 26 |
+
"rank_pattern": {},
|
| 27 |
+
"revision": null,
|
| 28 |
+
"target_modules": [
|
| 29 |
+
"k_proj",
|
| 30 |
+
"q_proj",
|
| 31 |
+
"o_proj",
|
| 32 |
+
"up_proj",
|
| 33 |
+
"gate_proj",
|
| 34 |
+
"down_proj",
|
| 35 |
+
"v_proj"
|
| 36 |
+
],
|
| 37 |
+
"task_type": "CAUSAL_LM",
|
| 38 |
+
"use_dora": false,
|
| 39 |
+
"use_rslora": false
|
| 40 |
+
}
|
gemma-news-lora-r64-d05-e3/added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
gemma-news-lora-r64-d05-e3/special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
gemma-news-lora-r64-d05-e3/tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
gemma-news-lora-r64-d05-e3/train_log.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"loss": 2.5261, "grad_norm": 1.8246350288391113, "learning_rate": 0.0002, "num_tokens": 3807.0, "mean_token_accuracy": 0.4527951776981354, "epoch": 0.0017613386173491853, "step": 1}, {"eval_loss": 2.449218988418579, "eval_runtime": 31.8531, "eval_samples_per_second": 8.162, "eval_steps_per_second": 8.162, "eval_num_tokens": 633043.0, "eval_mean_token_accuracy": 0.4652097007403007, "epoch": 0.3011889035667107, "step": 171}, {"loss": 2.4517, "grad_norm": 1.2670331001281738, "learning_rate": 0.0002, "num_tokens": 738884.0, "mean_token_accuracy": 0.4655214573570232, "epoch": 0.3522677234698371, "step": 200}, {"eval_loss": 2.43302321434021, "eval_runtime": 31.8708, "eval_samples_per_second": 8.158, "eval_steps_per_second": 8.158, "eval_num_tokens": 1262092.0, "eval_mean_token_accuracy": 0.46772955701901364, "epoch": 0.6023778071334214, "step": 342}, {"loss": 2.425, "grad_norm": 1.2736401557922363, "learning_rate": 0.0002, "num_tokens": 1474663.0, "mean_token_accuracy": 0.4697675767540932, "epoch": 0.7045354469396742, "step": 400}, {"eval_loss": 2.421541452407837, "eval_runtime": 31.8553, "eval_samples_per_second": 8.162, "eval_steps_per_second": 8.162, "eval_num_tokens": 1888559.0, "eval_mean_token_accuracy": 0.4689766614482953, "epoch": 0.9035667107001321, "step": 513}, {"loss": 2.3558, "grad_norm": 1.6144570112228394, "learning_rate": 0.0002, "num_tokens": 2211854.0, "mean_token_accuracy": 0.47664090248759605, "epoch": 1.056362835755174, "step": 600}, {"eval_loss": 2.4852662086486816, "eval_runtime": 31.7864, "eval_samples_per_second": 8.18, "eval_steps_per_second": 8.18, "eval_num_tokens": 2522674.0, "eval_mean_token_accuracy": 0.46549614461568684, "epoch": 1.2043152796125054, "step": 684}, {"loss": 1.9961, "grad_norm": 1.6300885677337646, "learning_rate": 0.0002, "num_tokens": 2951127.0, "mean_token_accuracy": 0.5263794268667698, "epoch": 1.408630559225011, "step": 800}, {"eval_loss": 2.48183012008667, "eval_runtime": 31.8686, "eval_samples_per_second": 8.158, "eval_steps_per_second": 8.158, "eval_num_tokens": 3153621.0, "eval_mean_token_accuracy": 0.4657316853220646, "epoch": 1.5055041831792162, "step": 855}, {"loss": 2.0152, "grad_norm": 1.537179946899414, "learning_rate": 0.0002, "num_tokens": 3686897.0, "mean_token_accuracy": 0.5224102056771517, "epoch": 1.760898282694848, "step": 1000}, {"eval_loss": 2.4842097759246826, "eval_runtime": 31.8647, "eval_samples_per_second": 8.16, "eval_steps_per_second": 8.16, "eval_num_tokens": 3783054.0, "eval_mean_token_accuracy": 0.46679874245937053, "epoch": 1.806693086745927, "step": 1026}, {"eval_loss": 2.6377148628234863, "eval_runtime": 31.8851, "eval_samples_per_second": 8.154, "eval_steps_per_second": 8.154, "eval_num_tokens": 4411369.0, "eval_mean_token_accuracy": 0.4592787031943981, "epoch": 2.1074416556583, "step": 1197}, {"loss": 1.9034, "grad_norm": 1.7180109024047852, "learning_rate": 0.0002, "num_tokens": 4421680.0, "mean_token_accuracy": 0.5434617290881757, "epoch": 2.112725671510348, "step": 1200}, {"eval_loss": 2.65483021736145, "eval_runtime": 31.8826, "eval_samples_per_second": 8.155, "eval_steps_per_second": 8.155, "eval_num_tokens": 5042684.0, "eval_mean_token_accuracy": 0.4594137238768431, "epoch": 2.408630559225011, "step": 1368}, {"loss": 1.6455, "grad_norm": 1.8122984170913696, "learning_rate": 0.0002, "num_tokens": 5161656.0, "mean_token_accuracy": 0.5877792361751198, "epoch": 2.4649933949801848, "step": 1400}, {"eval_loss": 2.6714894771575928, "eval_runtime": 31.8717, "eval_samples_per_second": 8.158, "eval_steps_per_second": 8.158, "eval_num_tokens": 5672906.0, "eval_mean_token_accuracy": 0.45914474255763565, "epoch": 2.709819462791722, "step": 1539}, {"loss": 1.6557, "grad_norm": 1.6596208810806274, "learning_rate": 0.0002, "num_tokens": 5895918.0, "mean_token_accuracy": 0.5840620636194944, "epoch": 2.817261118450022, "step": 1600}, {"train_runtime": 3194.3846, "train_samples_per_second": 2.133, "train_steps_per_second": 0.533, "total_flos": 3.961807344416563e+16, "train_loss": 2.0325709487630728, "num_tokens": 6276216.0, "mean_token_accuracy": 0.5815479272101299, "epoch": 3.0, "step": 1704}]
|
gemma-news-lora-r8-d05-e2/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/gemma-3-1b-pt
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: gemma-news-lora-r8-d05-e2
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- sft
|
| 8 |
+
- trl
|
| 9 |
+
licence: license
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Model Card for gemma-news-lora-r8-d05-e2
|
| 13 |
+
|
| 14 |
+
This model is a fine-tuned version of [google/gemma-3-1b-pt](https://huggingface.co/google/gemma-3-1b-pt).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
+
|
| 17 |
+
## Quick start
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from transformers import pipeline
|
| 21 |
+
|
| 22 |
+
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?"
|
| 23 |
+
generator = pipeline("text-generation", model="eantropix/gemma-news-lora-r8-d05-e2", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
## Training procedure
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
This model was trained with SFT.
|
| 34 |
+
|
| 35 |
+
### Framework versions
|
| 36 |
+
|
| 37 |
+
- TRL: 0.21.0
|
| 38 |
+
- Transformers: 4.57.0
|
| 39 |
+
- Pytorch: 2.8.0
|
| 40 |
+
- Datasets: 3.3.2
|
| 41 |
+
- Tokenizers: 0.22.1
|
| 42 |
+
|
| 43 |
+
## Citations
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Cite TRL as:
|
| 48 |
+
|
| 49 |
+
```bibtex
|
| 50 |
+
@misc{vonwerra2022trl,
|
| 51 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 52 |
+
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},
|
| 53 |
+
year = 2020,
|
| 54 |
+
journal = {GitHub repository},
|
| 55 |
+
publisher = {GitHub},
|
| 56 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
+
}
|
| 58 |
+
```
|
gemma-news-lora-r8-d05-e2/adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "google/gemma-3-1b-pt",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"eva_config": null,
|
| 7 |
+
"exclude_modules": null,
|
| 8 |
+
"fan_in_fan_out": false,
|
| 9 |
+
"inference_mode": true,
|
| 10 |
+
"init_lora_weights": true,
|
| 11 |
+
"layer_replication": null,
|
| 12 |
+
"layers_pattern": null,
|
| 13 |
+
"layers_to_transform": null,
|
| 14 |
+
"loftq_config": {},
|
| 15 |
+
"lora_alpha": 16,
|
| 16 |
+
"lora_bias": false,
|
| 17 |
+
"lora_dropout": 0.05,
|
| 18 |
+
"megatron_config": null,
|
| 19 |
+
"megatron_core": "megatron.core",
|
| 20 |
+
"modules_to_save": [
|
| 21 |
+
"lm_head",
|
| 22 |
+
"embed_tokens"
|
| 23 |
+
],
|
| 24 |
+
"peft_type": "LORA",
|
| 25 |
+
"r": 8,
|
| 26 |
+
"rank_pattern": {},
|
| 27 |
+
"revision": null,
|
| 28 |
+
"target_modules": [
|
| 29 |
+
"k_proj",
|
| 30 |
+
"q_proj",
|
| 31 |
+
"o_proj",
|
| 32 |
+
"up_proj",
|
| 33 |
+
"gate_proj",
|
| 34 |
+
"down_proj",
|
| 35 |
+
"v_proj"
|
| 36 |
+
],
|
| 37 |
+
"task_type": "CAUSAL_LM",
|
| 38 |
+
"use_dora": false,
|
| 39 |
+
"use_rslora": false
|
| 40 |
+
}
|
gemma-news-lora-r8-d05-e2/added_tokens.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<image_soft_token>": 262144
|
| 3 |
+
}
|
gemma-news-lora-r8-d05-e2/special_tokens_map.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"boi_token": "<start_of_image>",
|
| 3 |
+
"bos_token": {
|
| 4 |
+
"content": "<bos>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false
|
| 9 |
+
},
|
| 10 |
+
"eoi_token": "<end_of_image>",
|
| 11 |
+
"eos_token": {
|
| 12 |
+
"content": "<eos>",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false
|
| 17 |
+
},
|
| 18 |
+
"image_token": "<image_soft_token>",
|
| 19 |
+
"pad_token": {
|
| 20 |
+
"content": "<pad>",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false
|
| 25 |
+
},
|
| 26 |
+
"unk_token": {
|
| 27 |
+
"content": "<unk>",
|
| 28 |
+
"lstrip": false,
|
| 29 |
+
"normalized": false,
|
| 30 |
+
"rstrip": false,
|
| 31 |
+
"single_word": false
|
| 32 |
+
}
|
| 33 |
+
}
|
gemma-news-lora-r8-d05-e2/tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
gemma-news-lora-r8-d05-e2/train_log.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
[{"loss": 2.5261, "grad_norm": 1.861148476600647, "learning_rate": 0.0002, "num_tokens": 3807.0, "mean_token_accuracy": 0.4527951776981354, "epoch": 0.0017613386173491853, "step": 1}, {"eval_loss": 2.458406448364258, "eval_runtime": 31.2257, "eval_samples_per_second": 8.326, "eval_steps_per_second": 8.326, "eval_num_tokens": 424054.0, "eval_mean_token_accuracy": 0.46434662261834514, "epoch": 0.20079260237780713, "step": 114}, {"loss": 2.4518, "grad_norm": 1.3381743431091309, "learning_rate": 0.0002, "num_tokens": 738884.0, "mean_token_accuracy": 0.46552265046080155, "epoch": 0.3522677234698371, "step": 200}, {"eval_loss": 2.4464879035949707, "eval_runtime": 31.3043, "eval_samples_per_second": 8.306, "eval_steps_per_second": 8.306, "eval_num_tokens": 839084.0, "eval_mean_token_accuracy": 0.46530266644862983, "epoch": 0.40158520475561427, "step": 228}, {"eval_loss": 2.433694362640381, "eval_runtime": 31.2561, "eval_samples_per_second": 8.318, "eval_steps_per_second": 8.318, "eval_num_tokens": 1262092.0, "eval_mean_token_accuracy": 0.4674793000404651, "epoch": 0.6023778071334214, "step": 342}, {"loss": 2.4257, "grad_norm": 1.3601998090744019, "learning_rate": 0.0002, "num_tokens": 1474663.0, "mean_token_accuracy": 0.46974785182625056, "epoch": 0.7045354469396742, "step": 400}, {"eval_loss": 2.4250905513763428, "eval_runtime": 31.3183, "eval_samples_per_second": 8.302, "eval_steps_per_second": 8.302, "eval_num_tokens": 1681400.0, "eval_mean_token_accuracy": 0.4688024486486728, "epoch": 0.8031704095112285, "step": 456}, {"eval_loss": 2.419340133666992, "eval_runtime": 31.4251, "eval_samples_per_second": 8.274, "eval_steps_per_second": 8.274, "eval_num_tokens": 2099789.0, "eval_mean_token_accuracy": 0.4692547594125454, "epoch": 1.0035226772346983, "step": 570}, {"loss": 2.3581, "grad_norm": 1.6849342584609985, "learning_rate": 0.0002, "num_tokens": 2211854.0, "mean_token_accuracy": 0.47621352431621955, "epoch": 1.056362835755174, "step": 600}, {"eval_loss": 2.4852895736694336, "eval_runtime": 31.3631, "eval_samples_per_second": 8.29, "eval_steps_per_second": 8.29, "eval_num_tokens": 2522674.0, "eval_mean_token_accuracy": 0.46525458945677833, "epoch": 1.2043152796125054, "step": 684}, {"eval_loss": 2.487774610519409, "eval_runtime": 31.3389, "eval_samples_per_second": 8.296, "eval_steps_per_second": 8.296, "eval_num_tokens": 2944288.0, "eval_mean_token_accuracy": 0.4653494383280094, "epoch": 1.4051078819903127, "step": 798}, {"loss": 2.0068, "grad_norm": 1.7272013425827026, "learning_rate": 0.0002, "num_tokens": 2951127.0, "mean_token_accuracy": 0.5243334285914898, "epoch": 1.408630559225011, "step": 800}, {"eval_loss": 2.485473871231079, "eval_runtime": 31.3598, "eval_samples_per_second": 8.291, "eval_steps_per_second": 8.291, "eval_num_tokens": 3365331.0, "eval_mean_token_accuracy": 0.46635972398978015, "epoch": 1.6059004843681197, "step": 912}, {"loss": 2.03, "grad_norm": 1.6425286531448364, "learning_rate": 0.0002, "num_tokens": 3686897.0, "mean_token_accuracy": 0.520320530757308, "epoch": 1.760898282694848, "step": 1000}, {"eval_loss": 2.487150192260742, "eval_runtime": 31.3388, "eval_samples_per_second": 8.296, "eval_steps_per_second": 8.296, "eval_num_tokens": 3783054.0, "eval_mean_token_accuracy": 0.4659003231387872, "epoch": 1.806693086745927, "step": 1026}, {"train_runtime": 2169.1903, "train_samples_per_second": 2.094, "train_steps_per_second": 0.524, "total_flos": 2.526575685575885e+16, "train_loss": 2.2302425245583897, "num_tokens": 4184144.0, "mean_token_accuracy": 0.5170586583364075, "epoch": 2.0, "step": 1136}]
|