Views
No views yet
| Filename | Type | Description |
|---|---|---|
model.safetensors | Safetensors | The full unquantized model weights (for Python/Transformers). |
granite-2b-q4_k_m.gguf | GGUF (Q4) | Recommended. 4-bit quantized version. Fast & low memory (approx 1.5GB). |
granite-2b-fp16.gguf | GGUF (FP16) | High-precision quantized version. Larger size (approx 4.8GB). |
.gguf files with LM Studio, Ollama, or llama.cpp.1./llama-cli -m granite-2b-q4_k_m.gguf -p "User: Which is the best 4-wheeler for off-roading?\nAssistant:" -cnv
2
3🐍 How to Use (Python / Transformers)
4
5To use the full model in Python:
6Python
7
8from transformers import AutoModelForCausalLM, AutoTokenizer
9
10model_name = "Prithwiraj731/Granite-3.1-2b-FourWheeler"
11
12tokenizer = AutoTokenizer.from_pretrained(model_name)
13model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
14
15prompt = "User: Tell me about the engine specifications of a seden car.\nAssistant:"
16
17inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
18outputs = model.generate(**inputs, max_new_tokens=200)
19
20print(tokenizer.decode(outputs[0], skip_special_tokens=True))
21
22🔧 Training Details
23
24 Base Model: ibm-granite/granite-3.1-2b-instruct
25
26 Framework: Unsloth (PyTorch)
27
28 Quantization: Q4_K_M & FP16 GGUF
29
30 Fine-tuning type: LoRA (Low-Rank Adaptation)
31
32Finetuned with ❤️ using Unsloth.