Instructions to use trillionlabs/sim-scholar-qwen3-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use trillionlabs/sim-scholar-qwen3-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="trillionlabs/sim-scholar-qwen3-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("trillionlabs/sim-scholar-qwen3-4b") model = AutoModelForCausalLM.from_pretrained("trillionlabs/sim-scholar-qwen3-4b", 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 trillionlabs/sim-scholar-qwen3-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "trillionlabs/sim-scholar-qwen3-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": "trillionlabs/sim-scholar-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/trillionlabs/sim-scholar-qwen3-4b
- SGLang
How to use trillionlabs/sim-scholar-qwen3-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 "trillionlabs/sim-scholar-qwen3-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": "trillionlabs/sim-scholar-qwen3-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 "trillionlabs/sim-scholar-qwen3-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": "trillionlabs/sim-scholar-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use trillionlabs/sim-scholar-qwen3-4b with Docker Model Runner:
docker model run hf.co/trillionlabs/sim-scholar-qwen3-4b
S3 Qwen3 4B
A research checkpoint for tool-assisted scientific-literature search.
Code · S3 collection · Training data
S3 Qwen3 4B starts from
Qwen/Qwen3-4B-Thinking-2507
and is trained with on-policy reinforcement learning in the S3 local search
environment.
At a glance
| Property | Value |
|---|---|
| Base model | Qwen3-4B-Thinking-2507 |
| Checkpoint | Global step 120 |
| Training | verl GRPO with SEAL |
| Training questions | ~1,613 value-answer items in difficulty band [1, 7] |
| Environment | Nine tools over ~1.12M computer-science papers |
Evaluation
The checkpoint was evaluated with the native AstaBench tool surface on the
full-text-available LitQA2 test subset (n=75).
| Model | Accuracy |
|---|---|
| Qwen3-4B-Thinking-2507 base | 0.173 |
| S3 Qwen3 4B, step 120 | 0.453 |
Accuracy increased through step 120 and declined at later checkpoints. Transfer to the AstaBench paper-finder task remained approximately flat, suggesting that the gain is specific to QA-like tasks.
Step 120 was selected after inspecting this test-set checkpoint curve. The reported result is diagnostic rather than an unbiased final benchmark.
Load the model
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "trillionlabs/sim-scholar-qwen3-4b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype="auto",
)
Reproducing the reported behavior requires compatible tool definitions, prompting, observation formatting, and stopping behavior. These components are available in the linked code repository.
Intended use
This checkpoint is intended for research on literature-search agents, tool-using language models, agentic reinforcement learning, and sim-to-real transfer.
Limitations
- The model can hallucinate papers, citations, or answers.
- Reported performance comes from a small, post hoc selected evaluation.
- Training used synthetic questions over a computer-science-only corpus.
- Behavior depends strongly on the tool surface and retrieval backend.
- Value-answer training did not improve paper-finding performance.
The checkpoint should not be used as an authoritative source of scientific or medical information.
License
This checkpoint is licensed under the Apache License 2.0, consistent with the base model. Training-data and third-party material retain any applicable original terms.
- Downloads last month
- 32
Model tree for trillionlabs/sim-scholar-qwen3-4b
Base model
Qwen/Qwen3-4B-Thinking-2507