Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
sft
unsloth
trl
conversational
text-generation-inference
Instructions to use Ba2han/TR_SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ba2han/TR_SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ba2han/TR_SFT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ba2han/TR_SFT") model = AutoModelForCausalLM.from_pretrained("Ba2han/TR_SFT", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ba2han/TR_SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ba2han/TR_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": "Ba2han/TR_SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ba2han/TR_SFT
- SGLang
How to use Ba2han/TR_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 "Ba2han/TR_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": "Ba2han/TR_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 "Ba2han/TR_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": "Ba2han/TR_SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use Ba2han/TR_SFT with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ba2han/TR_SFT to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ba2han/TR_SFT to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ba2han/TR_SFT to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Ba2han/TR_SFT", max_seq_length=2048, ) - Docker Model Runner
How to use Ba2han/TR_SFT with Docker Model Runner:
docker model run hf.co/Ba2han/TR_SFT
Training in progress, step 474
Browse files- README.md +4 -5
- config.json +1 -1
- model.safetensors +1 -1
- tokenizer.json +1 -6
- tokenizer_config.json +2 -2
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -1,18 +1,17 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: Ba2han/outputs
|
| 3 |
library_name: transformers
|
| 4 |
model_name: TR_SFT
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- trl
|
| 8 |
- sft
|
| 9 |
-
- unsloth
|
| 10 |
licence: license
|
| 11 |
---
|
| 12 |
|
| 13 |
# Model Card for TR_SFT
|
| 14 |
|
| 15 |
-
This model is a fine-tuned version of [
|
| 16 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 17 |
|
| 18 |
## Quick start
|
|
@@ -28,7 +27,7 @@ print(output["generated_text"])
|
|
| 28 |
|
| 29 |
## Training procedure
|
| 30 |
|
| 31 |
-
[<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/batuhan409/huggingface/runs/
|
| 32 |
|
| 33 |
|
| 34 |
This model was trained with SFT.
|
|
@@ -38,7 +37,7 @@ This model was trained with SFT.
|
|
| 38 |
- TRL: 0.24.0
|
| 39 |
- Transformers: 5.5.0
|
| 40 |
- Pytorch: 2.10.0+cu128
|
| 41 |
-
- Datasets: 4.
|
| 42 |
- Tokenizers: 0.22.2
|
| 43 |
|
| 44 |
## Citations
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
model_name: TR_SFT
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
+
- unsloth
|
| 7 |
- trl
|
| 8 |
- sft
|
|
|
|
| 9 |
licence: license
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for TR_SFT
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [None](https://huggingface.co/None).
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
|
|
|
| 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/batuhan409/huggingface/runs/vlcy4szp)
|
| 31 |
|
| 32 |
|
| 33 |
This model was trained with SFT.
|
|
|
|
| 37 |
- TRL: 0.24.0
|
| 38 |
- Transformers: 5.5.0
|
| 39 |
- Pytorch: 2.10.0+cu128
|
| 40 |
+
- Datasets: 4.6.0
|
| 41 |
- Tokenizers: 0.22.2
|
| 42 |
|
| 43 |
## Citations
|
config.json
CHANGED
|
@@ -58,7 +58,7 @@
|
|
| 58 |
],
|
| 59 |
"max_position_embeddings": 16384,
|
| 60 |
"max_window_layers": 42,
|
| 61 |
-
"model_name": "
|
| 62 |
"model_type": "qwen3",
|
| 63 |
"num_attention_heads": 12,
|
| 64 |
"num_hidden_layers": 42,
|
|
|
|
| 58 |
],
|
| 59 |
"max_position_embeddings": 16384,
|
| 60 |
"max_window_layers": 42,
|
| 61 |
+
"model_name": "TR_CPT1/checkpoint-10000",
|
| 62 |
"model_type": "qwen3",
|
| 63 |
"num_attention_heads": 12,
|
| 64 |
"num_hidden_layers": 42,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2519929824
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef397b76f45fcbe2659ff62edbf0a82a1f951daeaf628939a2120fa6b02ebbeb
|
| 3 |
size 2519929824
|
tokenizer.json
CHANGED
|
@@ -1,11 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
"direction": "Right",
|
| 5 |
-
"max_length": 3072,
|
| 6 |
-
"strategy": "LongestFirst",
|
| 7 |
-
"stride": 0
|
| 8 |
-
},
|
| 9 |
"padding": null,
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
tokenizer_config.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
| 3 |
"bos_token": "<bos>",
|
| 4 |
"clean_up_tokenization_spaces": false,
|
| 5 |
"eos_token": "<eos>",
|
| 6 |
-
"is_local":
|
| 7 |
"model_max_length": 1000000000000000019884624838656,
|
| 8 |
"pad_token": "<pad>",
|
| 9 |
-
"padding_side": "
|
| 10 |
"tokenizer_class": "TokenizersBackend",
|
| 11 |
"unk_token": "<unk>",
|
| 12 |
"added_tokens_decoder": {
|
|
|
|
| 3 |
"bos_token": "<bos>",
|
| 4 |
"clean_up_tokenization_spaces": false,
|
| 5 |
"eos_token": "<eos>",
|
| 6 |
+
"is_local": true,
|
| 7 |
"model_max_length": 1000000000000000019884624838656,
|
| 8 |
"pad_token": "<pad>",
|
| 9 |
+
"padding_side": "right",
|
| 10 |
"tokenizer_class": "TokenizersBackend",
|
| 11 |
"unk_token": "<unk>",
|
| 12 |
"added_tokens_decoder": {
|
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:739c5713bb5758511b2bae79be46c940db56a861c1c0174f91add6f7de16f6bf
|
| 3 |
+
size 5713
|