Instructions to use snsnc/Seed-Coder-8B-Instruct-Rust-Strandset-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use snsnc/Seed-Coder-8B-Instruct-Rust-Strandset-LoRA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("ByteDance-Seed/Seed-Coder-8B-Instruct") model = PeftModel.from_pretrained(base_model, "snsnc/Seed-Coder-8B-Instruct-Rust-Strandset-LoRA") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,63 +1,51 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
base_model: ByteDance-Seed/Seed-Coder-8B-Instruct
|
| 3 |
library_name: peft
|
| 4 |
-
model_name: ByteDance-Seed_Seed-Coder-8B-Instruct_1782807672
|
| 5 |
tags:
|
| 6 |
-
- base_model:adapter:ByteDance-Seed/Seed-Coder-8B-Instruct
|
| 7 |
- lora
|
| 8 |
-
- sft
|
| 9 |
-
- transformers
|
| 10 |
-
- trl
|
| 11 |
- unsloth
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
| 17 |
|
| 18 |
-
|
| 19 |
-
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
``
|
| 24 |
-
from transformers import pipeline
|
| 25 |
|
| 26 |
-
|
| 27 |
-
generator = pipeline("text-generation", model="None", device="cuda")
|
| 28 |
-
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 29 |
-
print(output["generated_text"])
|
| 30 |
-
```
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
-
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
-
|
| 42 |
-
- TRL: 0.23.1
|
| 43 |
-
- Transformers: 4.57.6
|
| 44 |
-
- Pytorch: 2.10.0+cu130
|
| 45 |
-
- Datasets: 4.3.0
|
| 46 |
-
- Tokenizers: 0.22.2
|
| 47 |
-
|
| 48 |
-
## Citations
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
Cite TRL as:
|
| 53 |
-
|
| 54 |
-
```bibtex
|
| 55 |
-
@misc{vonwerra2022trl,
|
| 56 |
-
title = {{TRL: Transformer Reinforcement Learning}},
|
| 57 |
-
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},
|
| 58 |
-
year = 2020,
|
| 59 |
-
journal = {GitHub repository},
|
| 60 |
-
publisher = {GitHub},
|
| 61 |
-
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 62 |
-
}
|
| 63 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
base_model: ByteDance-Seed/Seed-Coder-8B-Instruct
|
| 4 |
library_name: peft
|
|
|
|
| 5 |
tags:
|
|
|
|
| 6 |
- lora
|
|
|
|
|
|
|
|
|
|
| 7 |
- unsloth
|
| 8 |
+
- seed-coder
|
| 9 |
+
- rust
|
| 10 |
+
- strandset
|
| 11 |
+
- code
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# Seed-Coder-8B-Instruct Rust Strandset LoRA
|
| 15 |
|
| 16 |
+
LoRA adapter trained with Unsloth Studio on a 20k-row subset of `Fortytwo-Network/Strandset-Rust-v1`.
|
|
|
|
| 17 |
|
| 18 |
+
Base model:
|
| 19 |
|
| 20 |
+
`ByteDance-Seed/Seed-Coder-8B-Instruct`
|
|
|
|
| 21 |
|
| 22 |
+
Training data:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
+
`Fortytwo-Network/Strandset-Rust-v1`
|
| 25 |
|
| 26 |
+
Mapping used:
|
| 27 |
|
| 28 |
+
- `input_data` → user
|
| 29 |
+
- `output_data` → assistant
|
| 30 |
+
- `task_category` → system
|
| 31 |
+
- `crate_name` → system
|
| 32 |
+
- `test` → none
|
| 33 |
|
| 34 |
+
Training config:
|
| 35 |
|
| 36 |
+
- Method: LoRA
|
| 37 |
+
- Context: 4096
|
| 38 |
+
- Epochs: 1
|
| 39 |
+
- LR: 2e-4
|
| 40 |
+
- Rank: 16
|
| 41 |
+
- Alpha: 32
|
| 42 |
+
- Dropout: 0.0
|
| 43 |
+
- Batch size: 16
|
| 44 |
+
- Grad accum: 2
|
| 45 |
+
- Effective batch: 32
|
| 46 |
+
- Weight decay: 0.001
|
| 47 |
+
- Warmup steps: 25
|
| 48 |
+
- Packing: off
|
| 49 |
+
- Train on completions: on
|
| 50 |
|
| 51 |
+
Note: this adapter was trained on Strandset-style structured Rust code tasks. It may emit JSON-style wrappers such as `{"code": "..."}` depending on prompting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|