Text Generation
Transformers
Safetensors
English
qwen3_5
image-text-to-text
text-to-sql
sql
bird
spider
agentic
qwen3.5
conversational
Instructions to use feyninc/sqrl-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use feyninc/sqrl-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="feyninc/sqrl-4b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("feyninc/sqrl-4b") model = AutoModelForMultimodalLM.from_pretrained("feyninc/sqrl-4b", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use feyninc/sqrl-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "feyninc/sqrl-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "feyninc/sqrl-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/feyninc/sqrl-4b
- SGLang
How to use feyninc/sqrl-4b 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 "feyninc/sqrl-4b" \ --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": "feyninc/sqrl-4b", "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 "feyninc/sqrl-4b" \ --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": "feyninc/sqrl-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use feyninc/sqrl-4b with Docker Model Runner:
docker model run hf.co/feyninc/sqrl-4b
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -34,26 +34,30 @@ It was trained in two stages:
|
|
| 34 |
|
| 35 |
## Results
|
| 36 |
|
| 37 |
-
All
|
| 38 |
-
|
| 39 |
-
|
|
|
|
| 40 |
|
| 41 |
-
| Benchmark |
|
| 42 |
-
|---|---|---|
|
| 43 |
-
| BIRD-dev
|
| 44 |
-
|
|
| 45 |
-
| Spider-test (2147) | pass@1 (pre-RL SFT checkpoint) | **80.3%** EX |
|
| 46 |
|
| 47 |
-
Family comparison on identical seeds (pass@1 / vote@8):
|
| 48 |
[sqrl-4b](https://huggingface.co/feyninc/sqrl-4b) 64.6 / 68.8 ·
|
| 49 |
[sqrl-9b](https://huggingface.co/feyninc/sqrl-9b) 66.6 / 69.8 ·
|
| 50 |
[sqrl-35b-a3b](https://huggingface.co/feyninc/sqrl-35b-a3b) 68.7 / 70.6.
|
| 51 |
|
| 52 |
Notes from the measurement campaign:
|
| 53 |
-
- Voting buys the 4B **+4.3 points** over single-pass
|
| 54 |
-
family
|
| 55 |
-
gain at half the cost.
|
| 56 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
- Vote unanimity is a strong free confidence signal: when all 8 samples agree the answer
|
| 58 |
is right ~87% of the time; narrow/tied votes are right ~19-43% — useful for routing
|
| 59 |
or escalation.
|
|
|
|
| 34 |
|
| 35 |
## Results
|
| 36 |
|
| 37 |
+
All numbers measured with the agentic harness at temperature 0.7. BIRD-dev is the full
|
| 38 |
+
1534-question set; Spider-test is 2147 questions. `pass@1` is the mean single-sample
|
| 39 |
+
exec-accuracy; `vote@k` is execution-clustered majority voting over k samples (group
|
| 40 |
+
candidates by identical execution result set, return the largest cluster's query).
|
| 41 |
|
| 42 |
+
| Benchmark | pass@1 | vote@8 | vote@16 | vote@32 |
|
| 43 |
+
|---|---|---|---|---|
|
| 44 |
+
| BIRD-dev (1534) | **64.6%** | **68.8%** | 69.4% | 69.2% |
|
| 45 |
+
| Spider-test (2147) | **84.0%** | **85.9%** | 85.9% | 86.1% |
|
|
|
|
| 46 |
|
| 47 |
+
Family comparison on identical seeds (BIRD-dev pass@1 / vote@8):
|
| 48 |
[sqrl-4b](https://huggingface.co/feyninc/sqrl-4b) 64.6 / 68.8 ·
|
| 49 |
[sqrl-9b](https://huggingface.co/feyninc/sqrl-9b) 66.6 / 69.8 ·
|
| 50 |
[sqrl-35b-a3b](https://huggingface.co/feyninc/sqrl-35b-a3b) 68.7 / 70.6.
|
| 51 |
|
| 52 |
Notes from the measurement campaign:
|
| 53 |
+
- Voting buys the 4B **+4.3 points** over single-pass on BIRD (the largest voting gain
|
| 54 |
+
in the family — smaller models keep more sample diversity). vote-of-4 captures ~85% of
|
| 55 |
+
that gain at half the cost.
|
| 56 |
+
- **Voting saturates by k≈8–16.** Past that, more samples add nothing: BIRD peaks at
|
| 57 |
+
vote@16 (69.4) and Spider is flat from vote@8 onward (~86%). Extra test-time compute is
|
| 58 |
+
better spent on a smarter selector than on more votes.
|
| 59 |
+
- Base Qwen3.5-4B scores ~52% on the same harness; the pre-RL SFT checkpoint ~63.6% on
|
| 60 |
+
BIRD (80.3% on Spider-test — RL lifts Spider single-shot to 84.0%).
|
| 61 |
- Vote unanimity is a strong free confidence signal: when all 8 samples agree the answer
|
| 62 |
is right ~87% of the time; narrow/tied votes are right ~19-43% — useful for routing
|
| 63 |
or escalation.
|