Instructions to use theprint/Rewiz-Gemma3-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use theprint/Rewiz-Gemma3-1B with PEFT:
Task type is invalid.
- Transformers
How to use theprint/Rewiz-Gemma3-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="theprint/Rewiz-Gemma3-1B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("theprint/Rewiz-Gemma3-1B") model = AutoModelForCausalLM.from_pretrained("theprint/Rewiz-Gemma3-1B") 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 theprint/Rewiz-Gemma3-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "theprint/Rewiz-Gemma3-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "theprint/Rewiz-Gemma3-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/theprint/Rewiz-Gemma3-1B
- SGLang
How to use theprint/Rewiz-Gemma3-1B 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 "theprint/Rewiz-Gemma3-1B" \ --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": "theprint/Rewiz-Gemma3-1B", "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 "theprint/Rewiz-Gemma3-1B" \ --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": "theprint/Rewiz-Gemma3-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use theprint/Rewiz-Gemma3-1B 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 theprint/Rewiz-Gemma3-1B 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 theprint/Rewiz-Gemma3-1B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for theprint/Rewiz-Gemma3-1B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="theprint/Rewiz-Gemma3-1B", max_seq_length=2048, ) - Docker Model Runner
How to use theprint/Rewiz-Gemma3-1B with Docker Model Runner:
docker model run hf.co/theprint/Rewiz-Gemma3-1B
Rewiz-Gemma3-1B
A fine-tuned Gemma 3 1B model, fine tuned on the Rewiz (short for Reasoning Wizard) dataset.
Model Details
This model is a fine-tuned version of google/gemma-3-1b-it using the Unsloth framework with LoRA (Low-Rank Adaptation) for efficient training.
- Developed by: theprint
- Model type: Causal Language Model (Fine-tuned with LoRA)
- Language: en
- License: mit
- Base model: google/gemma-3-1b-it
- Fine-tuning method: LoRA with rank 128
Intended Use
General conversation, project feedback and brainstorming.
GGUF Quantized Versions
Quantized GGUF versions are available in the theprint/Rewiz-Gemma3-1B-GGUF repo.
Rewiz-Gemma3-1B-f16.gguf(2489.6 MB) - 16-bit float (original precision, largest file)Rewiz-Gemma3-1B-q3_k_m.gguf(850.9 MB) - 3-bit quantization (medium quality)Rewiz-Gemma3-1B-q4_k_m.gguf(966.7 MB) - 4-bit quantization (medium, recommended for most use cases)Rewiz-Gemma3-1B-q5_k_m.gguf(1027.9 MB) - 5-bit quantization (medium, good quality)Rewiz-Gemma3-1B-q6_k.gguf(1270.9 MB) - 6-bit quantization (high quality)Rewiz-Gemma3-1B-q8_0.gguf(1325.8 MB) - 8-bit quantization (very high quality)
Training Details
Training Data
The data set used is theprint/ReWiz. It is a composite data set meant to heighten reasoning efforts in LMs.
- Dataset: theprint/ReWiz
- Format: alpaca
Training Procedure
- Training epochs: 2
- LoRA rank: 128
- Learning rate: 0.0001
- Batch size: 3
- Framework: Unsloth + transformers + PEFT
- Hardware: NVIDIA RTX 5090
Usage
from unsloth import FastLanguageModel
import torch
# Load model and tokenizer
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="theprint/Rewiz-Gemma3-1B",
max_seq_length=4096,
dtype=None,
load_in_4bit=True,
)
# Enable inference mode
FastLanguageModel.for_inference(model)
# Example usage
inputs = tokenizer(["Your prompt here"], return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Alternative Usage (Standard Transformers)
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"theprint/Rewiz-Gemma3-1B",
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("theprint/Rewiz-Gemma3-1B")
# Example usage
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Your question here"}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs, max_new_tokens=256, temperature=0.7, do_sample=True)
response = tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True)
print(response)
Using with llama.cpp
# Download a quantized version (q4_k_m recommended for most use cases)
wget https://huggingface.co/theprint/Rewiz-Gemma3-1B/resolve/main/gguf/Rewiz-Gemma3-1B-q4_k_m.gguf
# Run with llama.cpp
./llama.cpp/main -m Rewiz-Gemma3-1B-q4_k_m.gguf -p "Your prompt here" -n 256
Limitations
May provide incorrect information.
Citation
If you use this model, please cite:
@misc{rewiz_gemma3_1b,
title={Rewiz-Gemma3-1B: Fine-tuned google/gemma-3-1b-it},
author={theprint},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/theprint/Rewiz-Gemma3-1B}
}
Acknowledgments
- Base model: google/gemma-3-1b-it
- Training dataset: theprint/ReWiz
- Fine-tuning framework: Unsloth
- Quantization: llama.cpp
- Downloads last month
- -
Model tree for theprint/Rewiz-Gemma3-1B
Base model
google/gemma-3-1b-pt