Text Generation
Transformers
TensorBoard
Safetensors
gemma3_text
Generated from Trainer
sft
trl
conversational
text-generation-inference
Instructions to use sr5434/sft_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sr5434/sft_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sr5434/sft_model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sr5434/sft_model") model = AutoModelForCausalLM.from_pretrained("sr5434/sft_model", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sr5434/sft_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sr5434/sft_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sr5434/sft_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sr5434/sft_model
- SGLang
How to use sr5434/sft_model 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 "sr5434/sft_model" \ --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": "sr5434/sft_model", "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 "sr5434/sft_model" \ --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": "sr5434/sft_model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sr5434/sft_model with Docker Model Runner:
docker model run hf.co/sr5434/sft_model
End of training
Browse files
README.md
CHANGED
|
@@ -34,7 +34,7 @@ This model was trained with SFT.
|
|
| 34 |
|
| 35 |
### Framework versions
|
| 36 |
|
| 37 |
-
- TRL: 0.
|
| 38 |
- Transformers: 4.57.1
|
| 39 |
- Pytorch: 2.8.0+cu126
|
| 40 |
- Datasets: 4.4.2
|
|
@@ -47,12 +47,11 @@ This model was trained with SFT.
|
|
| 47 |
Cite TRL as:
|
| 48 |
|
| 49 |
```bibtex
|
| 50 |
-
@
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 57 |
}
|
| 58 |
```
|
|
|
|
| 34 |
|
| 35 |
### Framework versions
|
| 36 |
|
| 37 |
+
- TRL: 0.28.0
|
| 38 |
- Transformers: 4.57.1
|
| 39 |
- Pytorch: 2.8.0+cu126
|
| 40 |
- Datasets: 4.4.2
|
|
|
|
| 47 |
Cite TRL as:
|
| 48 |
|
| 49 |
```bibtex
|
| 50 |
+
@software{vonwerra2020trl,
|
| 51 |
+
title = {{TRL: Transformers Reinforcement Learning}},
|
| 52 |
+
author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
|
| 53 |
+
license = {Apache-2.0},
|
| 54 |
+
url = {https://github.com/huggingface/trl},
|
| 55 |
+
year = {2020}
|
|
|
|
| 56 |
}
|
| 57 |
```
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1072419256
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a7809a7a336cdd1afc751efb35937ac2a73940b092025119951ca9872c5bc69b
|
| 3 |
size 1072419256
|
runs/Feb14_13-38-21_9ca5c28012b5/events.out.tfevents.1771076994.9ca5c28012b5.65.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c26389e13eb550b19ff846f67399f873c3c4e126c1abf1e697cb35788d4ee220
|
| 3 |
+
size 254604
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6225
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a201640ba64cdd18261d8bc7d2fc4ade29e54906d680e10a52bdc26b7e0a0290
|
| 3 |
size 6225
|