Instructions to use Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF", filename="Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-BF16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
- Ollama
How to use Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF with Ollama:
ollama run hf.co/Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
- Unsloth Studio
How to use Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF to start chatting
- Pi
How to use Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF with Docker Model Runner:
docker model run hf.co/Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
- Lemonade
How to use Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF-Q4_K_M
List all available models
lemonade list
Qwen3-4B-Thinking-2507-GLM-4.7-Distilled
Qwen3-4B-Thinking-2507-GLM-4.7-Distilled is a fine-tuned model built upon the GRPO-optimized Jackrong/DASD-4B-Thinking-2507-GRPO-v2 (originally based on Qwen/Qwen3-4B-Thinking-2507). This model was developed using a Supervised Fine-Tuning (SFT) strategy heavily distilled from the GLM-4.7 model series (at a default temperature of 1.0), with a central focus on multi-turn conversational alignment and structured Chain-of-Thought (CoT) execution.
🎯 Core Improvement: The primary objective of this fine-tuning was to transform the model's reasoning pattern for everyday and lightweight tasks. Instead of the typical linear, free-associative, and highly self-correcting ("think-as-you-go") stream of consciousness, this model has learned to adopt a highly confident, "Plan-then-Execute" paradigm. It systematically breaks down tasks into logical outlines and executes modular, report-like responses without unnecessary self-doubt or hesitation.
🧬 Training Pipeline Overview
This model is the culmination of two sequential training stages targeting mathematical reasoning and conversational CoT tracking:
Qwen/Qwen3-4B-Thinking-2507
│
▼ Stage 0: GRPO (RL on Math & Reasoning)
DASD-4B-Thinking-2507-GRPO-v2
│
▼ Stage 1: SFT with GLM-4.7 Series Distilled Datasets (T=1.0)
Qwen3-4B-Thinking-2507-GLM-4.7-Distilled ← (this model)
🧠 Chain of Thought (CoT) Evolution: Base vs. Distilled
A significant shift in the model's reasoning style is observed after distillation from the GLM-4.7 series data. The model transitions from a spontaneous thinker into a structured planner:
| 🎯 Feature | 🌀 Base Model (Qwen3-4B-Thinking) | ✨ Distilled Model (GLM-4.7-Distilled) |
|---|---|---|
| Thinking Style | 🌊 Linear, stream-of-consciousness | 🧱 Modularized, report-like |
| Execution | 🏃 Thinks on the fly, writes as it thinks | 📝 "Plan-then-Execute" framework |
| Structure | 🔀 Unstructured, organic self-correction mid-thought | 📑 Highly structured with headings & logical phases |
| Confidence | 🤔 High self-doubt ("Wait...", "Maybe...", "Should I...") | 🚀 Highly confident, rarely hesitates |
| Output Tone | 🗣️ Conversational, exploring multiple paths | 📊 Objective, direct, and systematic |
🌟 Key Takeaway: Through the GLM-4.7 dataset distillation, the model successfully learned the modular thinking paradigm. Instead of continuously questioning itself, it now breaks down tasks, creates a clear outline, and systematically executes each step like writing a formal report.
📚 Stage Details
Stage 0 — GRPO Reinforcement Learning: DASD-4B-Thinking-2507-GRPO-v2
Starting from the base model Qwen/Qwen3-4B-Thinking-2507, Group Relative Policy Optimization (GRPO) was applied. This stage consisted of:
- Cold Start: Fine-tuning on the
unsloth/OpenMathReasoning-minidataset. - Reinforcement Learning: Applying GRPO via the
open-r1/DAPO-Math-17k-Processeddataset.
This stage significantly improved the model's:
- Correctness on math problem solving
- Step-by-step logical reasoning
- Reward signal alignment for verifiable tasks
Stage 1 — SFT GLM-4.7 Distillation (T=1.0): Qwen3-4B-Thinking-2507-GLM-4.7-Distilled (this model)
Building on the reasoning foundation of DASD-4B-Thinking-2507-GRPO-v2, Stage 1 SFT was performed using a mixed dataset heavily utilizing GLM-4.7 synthetic data generated at a default temperature of 1.0, along with multi-turn alignments.
Higher-temperature data introduces greater lexical diversity, broader mode coverage, and more formatted/structured chain-of-thought traces, enabling the model to generalize better across diverse conversational reasoning patterns and problem domains. It helps the model handle multi-turn conversations effectively while protecting its internal structure of <think>...</think> tracking.
🗂️ All Datasets Used
| Stage | Dataset | Purpose |
|---|---|---|
| GRPO (Cold Start) | unsloth/OpenMathReasoning-mini |
Initial foundational mathematical reasoning |
| GRPO (RL) | open-r1/DAPO-Math-17k-Processed |
Math & reasoning RL training via GRPO |
| SFT Distillation | Alibaba-Apsara/Superior-Reasoning-SFT-gpt-oss-120b (Stage 2) |
Diverse reasoning structures |
| SFT Distillation | Jackrong/glm-4.7-multiturn-CoT |
Multi-turn CoT alignment |
| SFT Distillation | Jackrong/glm-4.7-Superior-Reasoning-stage1 |
Enhanced fundamental reasoning |
| SFT Distillation | TeichAI/glm-4.7-2000x |
Generalization and lexical diversity |
| SFT Distillation | Jackrong/MultiReason-ChatAlpaca |
Conversational multi-turn tracking |
🏃 Quickstart
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Jackrong/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
messages = [
{"role": "user", "content": "Solve: find all real solutions to x^3 - 6x^2 + 11x - 6 = 0."}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=4096)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)
Tip: This model naturally generates
<think>...</think>reasoning traces before the final answer. You can parse these to inspect the chain-of-thought.
📋 Model Details
| Attribute | Value |
|---|---|
| Base Model | Jackrong/DASD-4B-Thinking-2507-GRPO-v2 |
| Architecture | Qwen3 (4B Dense) |
| License | Apache 2.0 |
| Language(s) | English, Chinese |
| Training Framework | Unsloth + Hugging Face TRL |
| RL Algorithm | GRPO (Group Relative Policy Optimization) |
| Fine-tuning Method | SFT (GLM-4.7 Distillation at T=1.0) |
| Developed by | Jackrong |
⚠️ Limitations & Intended Use
- This model is intended for research and educational purposes related to reasoning and mathematical problem-solving.
- While mathematical and logical reasoning capabilities have been enhanced, the model may still produce incorrect answers or hallucinations — always verify outputs on critical tasks.
- The model inherits the capabilities and limitations of the underlying
Qwen3-4B-Thinking-2507architecture. - Not intended for deployment in high-stakes applications without additional safety evaluation.
📎 Related Models
| Model | Description |
|---|---|
Qwen/Qwen3-4B-Thinking-2507 |
Base model |
Jackrong/DASD-4B-Thinking-2507-GRPO-v2 |
After GRPO RL training |
Jackrong/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled |
This model — GLM-4.7 Distilled |
🙏 Acknowledgements
- Zhipu AI for the GLM-4.7 model series capability
- Alibaba Cloud Apsara Lab for reasoning datasets
- Open-R1 for the DAPO Math dataset
- Unsloth for efficient fine-tuning infrastructure
- Qwen Team for the excellent base model
- Downloads last month
- 44
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for Ademola265/Qwen3-4B-Thinking-2507-GLM-4.7-Distilled-GGUF
Base model
Qwen/Qwen3-4B-Thinking-2507