Instructions to use TianshengHuang/s1k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TianshengHuang/s1k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TianshengHuang/s1k") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TianshengHuang/s1k") model = AutoModelForCausalLM.from_pretrained("TianshengHuang/s1k") 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/s1k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TianshengHuang/s1k" # 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/s1k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TianshengHuang/s1k
- SGLang
How to use TianshengHuang/s1k 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/s1k" \ --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/s1k", "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/s1k" \ --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/s1k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TianshengHuang/s1k with Docker Model Runner:
docker model run hf.co/TianshengHuang/s1k
Upload Qwen2ForCausalLM
Browse files- 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
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:941080803af1f10aa8b46d808061b079a4bb4cb33b095d8ac288e11dc1b7570b
|
| 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:bba0d934f11650f18fb9ecb83af89d894de1a983080136168255dcee5eaffdf2
|
| 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:e75104789af91a302dbefd35d257f62767b53de4da2bc910f0b2100b422e0f81
|
| 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:78c3f28f9210d9f3e9996b3973d3c7289d802fa89d7da30028ca8ef4bf04ab49
|
| 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:1f6e5a2f23a8aa52192e06e1914b550acad47e51c324ec9b8c977cee402ce83e
|
| 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:3f390393169ca4680e2b108343d2606a27a35dfb2278107bc8985f8fc638682b
|
| 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:f38e4ea55733303b37f826eef321cf1dd252af4f7c9143dc05033ae79f984b86
|
| 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:e1c9b9b1ab76ca89912079b2e50657b6a943275eccebb66b846230c7ca20614d
|
| 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:0c8753558acaf028b284fc9ee3d9c54ffe31a86d6e2a3aeeb04112649a6531bb
|
| 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:5759160c46dd2d06c5fd080b9cc181f5b8c76cdebd528e36fd40f1a36845de44
|
| 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:3bfa2e5d569e506c40213b849d3341f2f771e5966f963248c840af4c4522a5ea
|
| 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:1be75026843f4b4b5736a0e80b1c6ccb687d3db05869c2115acfdfb8b6bb7d2a
|
| 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:cbe6a984a50104c15cea08956c94e6b382d92e519a9685815404c454fd9fc4af
|
| 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:08717bbc4a8c16807cc8a820a9f6e02a8bed8288e6d9e9370b0dad5ded474a57
|
| 3 |
size 2123397800
|