Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use TianshengHuang/s1_sft_sft_5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TianshengHuang/s1_sft_sft_5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TianshengHuang/s1_sft_sft_5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TianshengHuang/s1_sft_sft_5") model = AutoModelForCausalLM.from_pretrained("TianshengHuang/s1_sft_sft_5") 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 TianshengHuang/s1_sft_sft_5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TianshengHuang/s1_sft_sft_5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TianshengHuang/s1_sft_sft_5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TianshengHuang/s1_sft_sft_5
- SGLang
How to use TianshengHuang/s1_sft_sft_5 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 "TianshengHuang/s1_sft_sft_5" \ --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": "TianshengHuang/s1_sft_sft_5", "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 "TianshengHuang/s1_sft_sft_5" \ --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": "TianshengHuang/s1_sft_sft_5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TianshengHuang/s1_sft_sft_5 with Docker Model Runner:
docker model run hf.co/TianshengHuang/s1_sft_sft_5
Model save
Browse files- README.md +2 -2
- config.json +1 -1
- model-00001-of-00014.safetensors +1 -1
- model-00002-of-00014.safetensors +1 -1
- model-00003-of-00014.safetensors +1 -1
- model-00004-of-00014.safetensors +1 -1
- model-00005-of-00014.safetensors +1 -1
- model-00006-of-00014.safetensors +1 -1
- model-00007-of-00014.safetensors +1 -1
- model-00008-of-00014.safetensors +1 -1
- model-00009-of-00014.safetensors +1 -1
- model-00010-of-00014.safetensors +1 -1
- model-00011-of-00014.safetensors +1 -1
- model-00012-of-00014.safetensors +1 -1
- model-00013-of-00014.safetensors +1 -1
- model-00014-of-00014.safetensors +1 -1
- tokenizer.json +1 -1
- tokenizer_config.json +5 -1
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
base_model:
|
| 3 |
library_name: transformers
|
| 4 |
model_name: s1_sft_sft
|
| 5 |
tags:
|
|
@@ -11,7 +11,7 @@ licence: license
|
|
| 11 |
|
| 12 |
# Model Card for s1_sft_sft
|
| 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
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: TianshengHuang/s1k
|
| 3 |
library_name: transformers
|
| 4 |
model_name: s1_sft_sft
|
| 5 |
tags:
|
|
|
|
| 11 |
|
| 12 |
# Model Card for s1_sft_sft
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [TianshengHuang/s1k](https://huggingface.co/TianshengHuang/s1k).
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"Qwen2ForCausalLM"
|
| 5 |
],
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "TianshengHuang/s1k",
|
| 3 |
"architectures": [
|
| 4 |
"Qwen2ForCausalLM"
|
| 5 |
],
|
model-00001-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4891730992
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:525446154d22755ae5b7672104002afd04f5c70820d2025cbae6e8d7542a6b77
|
| 3 |
size 4891730992
|
model-00002-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059352
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c6aae73bc2d76faad2763ebeced47281807c4bdcdee2a7913597ec128f1e0a0
|
| 3 |
size 4876059352
|
model-00003-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059384
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:82419abb85b9b96dcfb33c330de8523daf0f9ccaffdf743bbb107bfd399d44b5
|
| 3 |
size 4876059384
|
model-00004-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e269c151d59200d5740445bcd2b365dc0115471c3ff2231cedcc10bc6f004f6
|
| 3 |
size 4876059416
|
model-00005-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0cb2dcfcafd8eb29358276dd1023de780ed674402bdf6056302baeb0c8772dc4
|
| 3 |
size 4876059416
|
model-00006-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5df481c852698bd9de214adc0ea53c203eb792b73895188873e491df81efe3fe
|
| 3 |
size 4876059416
|
model-00007-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a81d71c8ee07d7332f4e60ffc27e154b27708016a475d79cb2a1d9ed90718e82
|
| 3 |
size 4876059416
|
model-00008-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9dc1632d214a0b85dc015dc40d5edcd45fd12f11c16c94edebc1c21756936f6b
|
| 3 |
size 4876059416
|
model-00009-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2f1c4e443a63426eab747851f2dcab24876de4660010af3d706480adba75c16e
|
| 3 |
size 4876059416
|
model-00010-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b2ea10d7020107b1904a360d53bf90544370c572c779853dd9b4c420c58ca31
|
| 3 |
size 4876059416
|
model-00011-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef8b4d4aca9369b733224ff5e4f9b1cde44121ff7a4fc019b3ffeff4f3760e77
|
| 3 |
size 4876059416
|
model-00012-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1e23f8bad838ff12e71c6fd9de9635032652f2304f4cacbffe2a2315d7f8dba8
|
| 3 |
size 4876059416
|
model-00013-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4876059416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1906546e8a6bb00d85cd0170db7ab90cf87e4972d900ea3550fe8b9cdc532d81
|
| 3 |
size 4876059416
|
model-00014-of-00014.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2123397800
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1e6882a568edbfaf9130d22e606f3328b8afb1b7e15a958d20b0c39507aec457
|
| 3 |
size 2123397800
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 11421996
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:68301b5308a972f0c3e44b7251787e603564d598575dab87d8068b0ef893996d
|
| 3 |
size 11421996
|
tokenizer_config.json
CHANGED
|
@@ -199,10 +199,14 @@
|
|
| 199 |
"clean_up_tokenization_spaces": false,
|
| 200 |
"eos_token": "<|im_end|>",
|
| 201 |
"errors": "replace",
|
|
|
|
|
|
|
| 202 |
"model_max_length": 131072,
|
| 203 |
"pad_token": "<|endoftext|>",
|
| 204 |
-
"padding_side": "right",
|
| 205 |
"split_special_tokens": false,
|
|
|
|
| 206 |
"tokenizer_class": "Qwen2Tokenizer",
|
|
|
|
|
|
|
| 207 |
"unk_token": null
|
| 208 |
}
|
|
|
|
| 199 |
"clean_up_tokenization_spaces": false,
|
| 200 |
"eos_token": "<|im_end|>",
|
| 201 |
"errors": "replace",
|
| 202 |
+
"extra_special_tokens": {},
|
| 203 |
+
"max_length": 20000,
|
| 204 |
"model_max_length": 131072,
|
| 205 |
"pad_token": "<|endoftext|>",
|
|
|
|
| 206 |
"split_special_tokens": false,
|
| 207 |
+
"stride": 0,
|
| 208 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 209 |
+
"truncation_side": "right",
|
| 210 |
+
"truncation_strategy": "longest_first",
|
| 211 |
"unk_token": null
|
| 212 |
}
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5752
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37ae2ec46f11fa2146317dcdbc4d92b756cb25ff3077f197fe8a9fa1a3de7ad5
|
| 3 |
size 5752
|