Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
trl
dpo
conversational
text-generation-inference
Instructions to use SaminSkyfall/sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SaminSkyfall/sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SaminSkyfall/sft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SaminSkyfall/sft") model = AutoModelForCausalLM.from_pretrained("SaminSkyfall/sft") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use SaminSkyfall/sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SaminSkyfall/sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SaminSkyfall/sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SaminSkyfall/sft
- SGLang
How to use SaminSkyfall/sft with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SaminSkyfall/sft" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SaminSkyfall/sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SaminSkyfall/sft" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SaminSkyfall/sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SaminSkyfall/sft with Docker Model Runner:
docker model run hf.co/SaminSkyfall/sft
Training in progress, step 5
Browse files- README.md +18 -8
- adapter_config.json +8 -5
- adapter_model.safetensors +2 -2
- config.json +1 -1
- model-00001-of-00002.safetensors +1 -1
- model-00002-of-00002.safetensors +1 -1
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -1,17 +1,16 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: Qwen/Qwen3-0.6B
|
| 3 |
library_name: transformers
|
| 4 |
-
model_name:
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
- trl
|
| 8 |
-
-
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Model Card for
|
| 13 |
|
| 14 |
-
This model is a fine-tuned version of [
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
|
@@ -20,17 +19,17 @@ It has been trained using [TRL](https://github.com/huggingface/trl).
|
|
| 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="SaminSkyfall/
|
| 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/samin-skyfall-ai/huggingface/runs/
|
| 31 |
|
| 32 |
|
| 33 |
-
This model was trained with
|
| 34 |
|
| 35 |
### Framework versions
|
| 36 |
|
|
@@ -42,7 +41,18 @@ This model was trained with SFT.
|
|
| 42 |
|
| 43 |
## Citations
|
| 44 |
|
|
|
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
Cite TRL as:
|
| 48 |
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
+
model_name: dpo_full_1.7
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
- trl
|
| 7 |
+
- dpo
|
| 8 |
licence: license
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Model Card for dpo_full_1.7
|
| 12 |
|
| 13 |
+
This model is a fine-tuned version of [None](https://huggingface.co/None).
|
| 14 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 15 |
|
| 16 |
## Quick start
|
|
|
|
| 19 |
from transformers import pipeline
|
| 20 |
|
| 21 |
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?"
|
| 22 |
+
generator = pipeline("text-generation", model="SaminSkyfall/dpo_full_1.7", device="cuda")
|
| 23 |
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 24 |
print(output["generated_text"])
|
| 25 |
```
|
| 26 |
|
| 27 |
## Training procedure
|
| 28 |
|
| 29 |
+
[<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/samin-skyfall-ai/huggingface/runs/lc17gapu)
|
| 30 |
|
| 31 |
|
| 32 |
+
This model was trained with DPO, a method introduced in [Direct Preference Optimization: Your Language Model is Secretly a Reward Model](https://huggingface.co/papers/2305.18290).
|
| 33 |
|
| 34 |
### Framework versions
|
| 35 |
|
|
|
|
| 41 |
|
| 42 |
## Citations
|
| 43 |
|
| 44 |
+
Cite DPO as:
|
| 45 |
|
| 46 |
+
```bibtex
|
| 47 |
+
@inproceedings{rafailov2023direct,
|
| 48 |
+
title = {{Direct Preference Optimization: Your Language Model is Secretly a Reward Model}},
|
| 49 |
+
author = {Rafael Rafailov and Archit Sharma and Eric Mitchell and Christopher D. Manning and Stefano Ermon and Chelsea Finn},
|
| 50 |
+
year = 2023,
|
| 51 |
+
booktitle = {Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023},
|
| 52 |
+
url = {http://papers.nips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html},
|
| 53 |
+
editor = {Alice Oh and Tristan Naumann and Amir Globerson and Kate Saenko and Moritz Hardt and Sergey Levine},
|
| 54 |
+
}
|
| 55 |
+
```
|
| 56 |
|
| 57 |
Cite TRL as:
|
| 58 |
|
adapter_config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"alpha_pattern": {},
|
| 3 |
"auto_mapping": null,
|
| 4 |
-
"base_model_name_or_path": "Qwen/Qwen3-
|
| 5 |
"bias": "none",
|
| 6 |
"corda_config": null,
|
| 7 |
"eva_config": null,
|
|
@@ -18,21 +18,24 @@
|
|
| 18 |
"lora_dropout": 0.0,
|
| 19 |
"megatron_config": null,
|
| 20 |
"megatron_core": "megatron.core",
|
| 21 |
-
"modules_to_save":
|
|
|
|
|
|
|
|
|
|
| 22 |
"peft_type": "LORA",
|
| 23 |
"r": 32,
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
| 27 |
"up_proj",
|
| 28 |
-
"q_proj",
|
| 29 |
"gate_proj",
|
| 30 |
"o_proj",
|
| 31 |
"k_proj",
|
| 32 |
"down_proj",
|
| 33 |
-
"v_proj"
|
|
|
|
| 34 |
],
|
| 35 |
-
"task_type": "
|
| 36 |
"trainable_token_indices": null,
|
| 37 |
"use_dora": false,
|
| 38 |
"use_rslora": false
|
|
|
|
| 1 |
{
|
| 2 |
"alpha_pattern": {},
|
| 3 |
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "Qwen/Qwen3-0.6B",
|
| 5 |
"bias": "none",
|
| 6 |
"corda_config": null,
|
| 7 |
"eva_config": null,
|
|
|
|
| 18 |
"lora_dropout": 0.0,
|
| 19 |
"megatron_config": null,
|
| 20 |
"megatron_core": "megatron.core",
|
| 21 |
+
"modules_to_save": [
|
| 22 |
+
"classifier",
|
| 23 |
+
"score"
|
| 24 |
+
],
|
| 25 |
"peft_type": "LORA",
|
| 26 |
"r": 32,
|
| 27 |
"rank_pattern": {},
|
| 28 |
"revision": null,
|
| 29 |
"target_modules": [
|
| 30 |
"up_proj",
|
|
|
|
| 31 |
"gate_proj",
|
| 32 |
"o_proj",
|
| 33 |
"k_proj",
|
| 34 |
"down_proj",
|
| 35 |
+
"v_proj",
|
| 36 |
+
"q_proj"
|
| 37 |
],
|
| 38 |
+
"task_type": "SEQ_CLS",
|
| 39 |
"trainable_token_indices": null,
|
| 40 |
"use_dora": false,
|
| 41 |
"use_rslora": false
|
adapter_model.safetensors
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:7b4852f593289d8d754fb266ca714000259357a59ed79306d2de4f8dba95c8d0
|
| 3 |
+
size 80796648
|
config.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
"rope_theta": 1000000,
|
| 24 |
"sliding_window": null,
|
| 25 |
"tie_word_embeddings": true,
|
| 26 |
-
"torch_dtype": "
|
| 27 |
"transformers_version": "4.51.3",
|
| 28 |
"use_cache": true,
|
| 29 |
"use_sliding_window": false,
|
|
|
|
| 23 |
"rope_theta": 1000000,
|
| 24 |
"sliding_window": null,
|
| 25 |
"tie_word_embeddings": true,
|
| 26 |
+
"torch_dtype": "float32",
|
| 27 |
"transformers_version": "4.51.3",
|
| 28 |
"use_cache": true,
|
| 29 |
"use_sliding_window": false,
|
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4969539560
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22ec6d375dfdbdaa1a7fa473ec529a3f4bb6b5f096aa185eb87bec70ef2dc35b
|
| 3 |
size 4969539560
|
model-00002-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1912795688
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:753d24c6c821e2a4ddd49039983732d238c3f062c6cd92361141e9f9d4e843fa
|
| 3 |
size 1912795688
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6033
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce90abc86c871f836a6032a8a14fa996159108621f757ccb76c6a4b82a4a59fd
|
| 3 |
size 6033
|