HuggingFaceH4/no_robots
Viewer • Updated • 10k • 9.53k • 549
How to use natolambert/qwen3-dgx-spark-sft with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="natolambert/qwen3-dgx-spark-sft")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("natolambert/qwen3-dgx-spark-sft")
model = AutoModelForCausalLM.from_pretrained("natolambert/qwen3-dgx-spark-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]:]))How to use natolambert/qwen3-dgx-spark-sft with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "natolambert/qwen3-dgx-spark-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": "natolambert/qwen3-dgx-spark-sft",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/natolambert/qwen3-dgx-spark-sft
How to use natolambert/qwen3-dgx-spark-sft with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "natolambert/qwen3-dgx-spark-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": "natolambert/qwen3-dgx-spark-sft",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "natolambert/qwen3-dgx-spark-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": "natolambert/qwen3-dgx-spark-sft",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use natolambert/qwen3-dgx-spark-sft with Docker Model Runner:
docker model run hf.co/natolambert/qwen3-dgx-spark-sft
A supervised fine-tuned version of Qwen3-0.6B trained on the no_robots dataset.
This model was trained on an NVIDIA DGX Spark (GB10 Blackwell GPU) as part of testing open-instruct on the new hardware platform.
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen3-0.6B |
| Dataset | HuggingFaceH4/no_robots |
| Epochs | 2 |
| Batch size | 32 |
| Gradient accumulation | 4 |
| Learning rate | 2e-5 |
| Scheduler | cosine |
| Max sequence length | 1024 |
| Precision | bf16 |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("natolambert/qwen3-dgx-spark-sft")
tokenizer = AutoTokenizer.from_pretrained("natolambert/qwen3-dgx-spark-sft")
messages = [{"role": "user", "content": "Write a short poem about machine learning."}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Trained using the DGX Spark SFT script from open-instruct:
./scripts/train/dgx-spark/sft_no_robots.sh
See dgx-spark-setup for details on running ML training on DGX Spark.
This is primarily a test model to validate the DGX Spark training pipeline. It has not been extensively evaluated for downstream tasks.