Instructions to use mrankitvish577/Qwen3-4B-Instruct-2507-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use mrankitvish577/Qwen3-4B-Instruct-2507-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 mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf mrankitvish577/Qwen3-4B-Instruct-2507-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 mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf mrankitvish577/Qwen3-4B-Instruct-2507-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 mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf mrankitvish577/Qwen3-4B-Instruct-2507-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 mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M
Use Docker
docker model run hf.co/mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use mrankitvish577/Qwen3-4B-Instruct-2507-GGUF with Ollama:
ollama run hf.co/mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use mrankitvish577/Qwen3-4B-Instruct-2507-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use mrankitvish577/Qwen3-4B-Instruct-2507-GGUF with Docker Model Runner:
docker model run hf.co/mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M
- Lemonade
How to use mrankitvish577/Qwen3-4B-Instruct-2507-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3-4B-Instruct-2507-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use mrankitvish577/Qwen3-4B-Instruct-2507-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 mrankitvish577/Qwen3-4B-Instruct-2507-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 mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mrankitvish577/Qwen3-4B-Instruct-2507-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "mrankitvish577/Qwen3-4B-Instruct-2507-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
mrankitvish577/Qwen3-4B-Instruct-2507-GGUF
This repository hosts a fine-tuned and quantized version of the Qwen3-4B-Instruct-2507 model, optimized for efficiency and performance with Unsloth. The model has been fine-tuned on the Maxime Labonne's FineTome-100k dataset and converted to GGUF format for use with llama.cpp and Ollama.
Model Details
- Base Model: unsloth/Qwen3-4B-Instruct-2507
- Fine-tuning Library: Unsloth AI
- Fine-tuning Dataset: mlabonne/FineTome-100k
- Quantization Methods:
q4_k_m,q8_0,q5_k_m(GGUF)
How to use with llama.cpp / Ollama
These GGUF files are designed for use with llama.cpp or Ollama. You can download the .gguf files directly and use them with the respective tools.
Example llama.cpp usage:
./llama.cpp/llama-cli --model qwen3-4b-instruct-2507.Q5_K_M.gguf -p "<|im_start|>user\nContinue the sequence: 1, 1, 2, 3, 5, 8,<|im_end|>\n<|im_start|>assistant\n"
Example Ollama usage:
If you've used ollama create with the provided Modelfile (available in this repository), you can run:
ollama run mrankitvish577/Qwen3-4B-Instruct-2507-GGUF
How to load and use this model (Unsloth)
If you want to load the LoRA adapters or the merged model back into Unsloth, you can do so as follows:
Loading LoRA adapters (requires the original base model):
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "unsloth/Qwen3-4B-Instruct-2507", # The base model
max_seq_length = 2048,
load_in_4bit = True,
)
# Load the LoRA adapters
model.load_adapter("mrankitvish577/qwen_lora") # Assuming you also pushed lora adapters
# Prepare for inference
messages = [
{"role" : "user", "content" : "Continue the sequence: 1, 1, 2, 3, 5, 8,"
]
text = tokenizer.apply_chat_template(
messages,
tokenize = False,
add_generation_prompt = True,
)
from transformers import TextStreamer
_ = model.generate(
**tokenizer(text, return_tensors = "pt").to("cuda"),
max_new_tokens = 1000,
temperature = 0.7, top_p = 0.8, top_k = 20,
streamer = TextStreamer(tokenizer, skip_prompt = True),
)
Loading the merged 4-bit or 16-bit model (if merged versions were pushed):
from unsloth import FastLanguageModel
# For 4-bit merged model
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "mrankitvish577/qwen_finetune_4bit", # Or your merged 16bit model
max_seq_length = 2048,
load_in_4bit = True, # Use load_in_4bit=False for 16bit merged models
)
# Prepare for inference
messages = [
{"role" : "user", "content" : "Continue the sequence: 1, 1, 2, 3, 5, 8,"
]
text = tokenizer.apply_chat_template(
messages,
tokenize = False,
add_generation_prompt = True,
)
from transformers import TextStreamer
_ = model.generate(
**tokenizer(text, return_tensors = "pt").to("cuda"),
max_new_tokens = 1000,
temperature = 0.7, top_p = 0.8, top_k = 20,
streamer = TextStreamer(tokenizer, skip_prompt = True),
)
License
This model is licensed under the LGPL-3.0 license.
Acknowledgements
This model was fine-tuned using Unsloth AI, which provides efficient tools for LLM fine-tuning.
- Downloads last month
- 21
4-bit
5-bit
8-bit
Model tree for mrankitvish577/Qwen3-4B-Instruct-2507-GGUF
Base model
Qwen/Qwen3-4B-Instruct-2507
ollama run hf.co/mrankitvish577/Qwen3-4B-Instruct-2507-GGUF: