Instructions to use rayraycano/finetune-demo-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rayraycano/finetune-demo-lora with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rayraycano/finetune-demo-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Training in progress, step 38
Browse files- README.md +3 -56
- adapter_config.json +3 -3
- adapter_model.safetensors +1 -1
- config.py +4 -4
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -1,58 +1,5 @@
|
|
| 1 |
-
|
| 2 |
-
base_model: google/gemma-3-27b-it
|
| 3 |
-
library_name: transformers
|
| 4 |
-
model_name: finetune-demo-lora
|
| 5 |
-
tags:
|
| 6 |
-
- generated_from_trainer
|
| 7 |
-
- trl
|
| 8 |
-
- sft
|
| 9 |
-
licence: license
|
| 10 |
-
---
|
| 11 |
|
| 12 |
-
|
| 13 |
|
| 14 |
-
|
| 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="rayraycano/finetune-demo-lora", 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 |
-
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/philipkiely-baseten/baseten-finetune-demo/runs/y2yddifv)
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
This model was trained with SFT.
|
| 34 |
-
|
| 35 |
-
### Framework versions
|
| 36 |
-
|
| 37 |
-
- TRL: 0.15.1
|
| 38 |
-
- Transformers: 4.50.0
|
| 39 |
-
- Pytorch: 2.6.0+cu124
|
| 40 |
-
- Datasets: 3.4.1
|
| 41 |
-
- Tokenizers: 0.21.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édec},
|
| 53 |
-
year = 2020,
|
| 54 |
-
journal = {GitHub repository},
|
| 55 |
-
publisher = {GitHub},
|
| 56 |
-
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
-
}
|
| 58 |
-
```
|
|
|
|
| 1 |
+
# Baseten Training Demo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
This is a demo of how to finetune a model using Baseten Training.
|
| 4 |
|
| 5 |
+
See the [Get Started](https://docs.baseten.com/get-started) guide to learn more about how to use Baseten Training.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
adapter_config.json
CHANGED
|
@@ -24,13 +24,13 @@
|
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
| 27 |
-
"k_proj",
|
| 28 |
"gate_proj",
|
| 29 |
"q_proj",
|
| 30 |
-
"
|
|
|
|
| 31 |
"down_proj",
|
| 32 |
"up_proj",
|
| 33 |
-
"
|
| 34 |
],
|
| 35 |
"task_type": "CAUSAL_LM",
|
| 36 |
"trainable_token_indices": null,
|
|
|
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
|
|
|
| 27 |
"gate_proj",
|
| 28 |
"q_proj",
|
| 29 |
+
"o_proj",
|
| 30 |
+
"k_proj",
|
| 31 |
"down_proj",
|
| 32 |
"up_proj",
|
| 33 |
+
"v_proj"
|
| 34 |
],
|
| 35 |
"task_type": "CAUSAL_LM",
|
| 36 |
"trainable_token_indices": null,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 113632496
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0866d11ec1b3e6c3d52e42ce0f9466c229d211d6ac1c09da21e95187ecc836ac
|
| 3 |
size 113632496
|
config.py
CHANGED
|
@@ -18,9 +18,9 @@ runtime = definitions.Runtime(
|
|
| 18 |
"OUTPUT_LORA_REPO_ID": "rayraycano/finetune-demo-lora", # TODO: your HF Repo ID
|
| 19 |
},
|
| 20 |
enable_cache=True,
|
| 21 |
-
checkpointing_config=definitions.CheckpointingConfig(
|
| 22 |
-
|
| 23 |
-
),
|
| 24 |
)
|
| 25 |
|
| 26 |
"""
|
|
@@ -32,7 +32,7 @@ compute = definitions.Compute(
|
|
| 32 |
accelerator=truss_config.Accelerator.H200,
|
| 33 |
count=8,
|
| 34 |
),
|
| 35 |
-
|
| 36 |
)
|
| 37 |
|
| 38 |
"""
|
|
|
|
| 18 |
"OUTPUT_LORA_REPO_ID": "rayraycano/finetune-demo-lora", # TODO: your HF Repo ID
|
| 19 |
},
|
| 20 |
enable_cache=True,
|
| 21 |
+
# checkpointing_config=definitions.CheckpointingConfig(
|
| 22 |
+
# enabled=True,
|
| 23 |
+
# ),
|
| 24 |
)
|
| 25 |
|
| 26 |
"""
|
|
|
|
| 32 |
accelerator=truss_config.Accelerator.H200,
|
| 33 |
count=8,
|
| 34 |
),
|
| 35 |
+
node_count=2,
|
| 36 |
)
|
| 37 |
|
| 38 |
"""
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:845e5541434556dc2b5a7fd6819ebe6e1e49ee5b3a7e173ee184a0043de929f1
|
| 3 |
+
size 6840
|