Instructions to use prithivMLmods/Crux-Qwen3_OpenThinking-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Crux-Qwen3_OpenThinking-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/Crux-Qwen3_OpenThinking-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Crux-Qwen3_OpenThinking-4B") model = AutoModelForCausalLM.from_pretrained("prithivMLmods/Crux-Qwen3_OpenThinking-4B") 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
- vLLM
How to use prithivMLmods/Crux-Qwen3_OpenThinking-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Crux-Qwen3_OpenThinking-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": "prithivMLmods/Crux-Qwen3_OpenThinking-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/Crux-Qwen3_OpenThinking-4B
- SGLang
How to use prithivMLmods/Crux-Qwen3_OpenThinking-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 "prithivMLmods/Crux-Qwen3_OpenThinking-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": "prithivMLmods/Crux-Qwen3_OpenThinking-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 "prithivMLmods/Crux-Qwen3_OpenThinking-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": "prithivMLmods/Crux-Qwen3_OpenThinking-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/Crux-Qwen3_OpenThinking-4B with Docker Model Runner:
docker model run hf.co/prithivMLmods/Crux-Qwen3_OpenThinking-4B
Crux-Qwen3_OpenThinking-4B
Crux-Qwen3_OpenThinking-4B is fine-tuned on the Qwen3-4B architecture, optimized for advanced open thinking, mathematical reasoning, and logical problem solving. This model is trained on the traces of sk1.1, which include 1,000 entries from the Gemini thinking trajectory, combined with fine-tuning on 100k tokens of open math reasoning data. This makes it highly effective for nuanced reasoning, educational tasks, and complex problem-solving requiring clear thought processes.
GGUF : https://huggingface.co/prithivMLmods/Crux-Qwen3_OpenThinking-4B-GGUF
Key Features
Open and Structured Thinking Fine-tuned on Gemini trajectory data and sk1.1 traces, enabling it to model complex thought processes, open reasoning, and multi-step problem-solving.
Mathematical and Logical Reasoning Trained with a focus on symbolic logic, arithmetic, and multi-step math problems, ideal for STEM education and technical domains.
Code Understanding and Generation Capable of writing, interpreting, and explaining code snippets in Python, JavaScript, and other languages with clarity.
Factual Precision and Reliability Curated datasets and reasoning benchmarks minimize hallucinations, ensuring trustworthy outputs for technical content.
Instruction-Tuned for Clarity Strong compliance with structured prompts, delivering step-by-step reasoning, formatted outputs (Markdown, JSON, tables), and clear explanations.
Multilingual Capabilities Supports over 20 languages for educational and technical translations across diverse linguistic contexts.
Optimized Efficiency Utilizes the 4B parameter Qwen3 base for resource-friendly deployment while maintaining strong reasoning performance.
Quickstart with Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "prithivMLmods/Crux-Qwen3_OpenThinking-4B"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Explain the thought process behind solving: If 5x - 3 = 2x + 12, find x."
messages = [
{"role": "system", "content": "You are an open thinking tutor who explains reasoning clearly."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
Intended Use
- Advanced open and logical reasoning
- Educational STEM tutoring and math problem solving
- Code assistance, explanation, and debugging
- Structured content generation (JSON, Markdown, tables)
- Multilingual reasoning and translation
- Lightweight, efficient deployment for reasoning tasks
Limitations
- Less suited for highly creative or fictional content generation
- May require clear, unambiguous prompts for best results
- Smaller context window relative to larger models (14B+)
- Possible occasional factual inaccuracies in rare edge cases
References
- Downloads last month
- 12
Model tree for prithivMLmods/Crux-Qwen3_OpenThinking-4B
Base model
Qwen/Qwen3-4B-Base