Instructions to use Losa10/Qwen3-4B-Thinking-Slerp-F with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Losa10/Qwen3-4B-Thinking-Slerp-F with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Losa10/Qwen3-4B-Thinking-Slerp-F") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Losa10/Qwen3-4B-Thinking-Slerp-F") model = AutoModelForCausalLM.from_pretrained("Losa10/Qwen3-4B-Thinking-Slerp-F", 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 Losa10/Qwen3-4B-Thinking-Slerp-F with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Losa10/Qwen3-4B-Thinking-Slerp-F" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Losa10/Qwen3-4B-Thinking-Slerp-F", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Losa10/Qwen3-4B-Thinking-Slerp-F
- SGLang
How to use Losa10/Qwen3-4B-Thinking-Slerp-F 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 "Losa10/Qwen3-4B-Thinking-Slerp-F" \ --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": "Losa10/Qwen3-4B-Thinking-Slerp-F", "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 "Losa10/Qwen3-4B-Thinking-Slerp-F" \ --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": "Losa10/Qwen3-4B-Thinking-Slerp-F", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Losa10/Qwen3-4B-Thinking-Slerp-F with Docker Model Runner:
docker model run hf.co/Losa10/Qwen3-4B-Thinking-Slerp-F
Qwen3-4B-Thinking-Slerp-FH
This model is a Spherical Linear Interpolation (SLERP) merge of two specialized Qwen3-4B variants. It aims to combine high-level reasoning capabilities from distilled thinking models with refined instruction-following from SFT (Supervised Fine-Tuning).
Merge Details
Merge Method
This model was merged using the SLERP (Spherical Linear Interpolation) method. SLERP is ideal for merging models of the same architecture as it preserves the geometric characteristics of the weight space better than traditional linear averaging.
Models Merged
The following models were included in the merge:
- TeichAI/Qwen3-4B-Thinking...Distill: High-reasoning capabilities via distillation.
- Losa10/Qwen3-4B-Thinking...SFT: Enhanced thinking and chat instruction following.
Configuration
The merge used a dynamic interpolation factor ($t$) to balance attention and MLP weights across the model layers:
slices:
- sources:
- model: TeichAI/Qwen3-4B-Thinking-2507-Gemini-3-Pro-Preview-High-Reasoning-Distill
layer_range: [0, 36]
- model: Losa10/Qwen3-4B-Thinking-2507-G3P-F-SFT
layer_range: [0, 36]
merge_method: slerp
base_model: TeichAI/Qwen3-4B-Thinking-2507-Gemini-3-Pro-Preview-High-Reasoning-Distill
parameters:
t:
- filter: self_attn
value: [0.4, 0.6] # Favors SFT in deeper attention layers
- filter: mlp
value: [0.6, 0.4] # Favors Reasoning in deeper MLP layers
- value: 0.5
dtype: bfloat16
- Downloads last month
- 7