Downloads · 30 days
4
2% of all-time downloads
mohd-musheer/inferra
inferra is a machine learning model from mohd-musheer. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Lightweight conversational AI model built using QLoRA fine-tuning on top of Qwen2.5-3B-Instruct.
Downloads · 30 days
4
2% of all-time downloads
All-time downloads
166
Public
Repo size
8.2 GB
Likes
0
Public
Click a slice to open those files.
.gguf8.1 GB · 99%
From the Hugging Face model README
Lightweight conversational AI model built using QLoRA fine-tuning on top of Qwen2.5-3B-Instruct.
| Property | Value |
|---|---|
| Base Model | Qwen2.5-3B-Instruct |
| Fine-Tuning | QLoRA |
| Precision | 4-bit |
| Trainable Params | ~15M |
| Total Params | ~3.1B |
| GPU Used | NVIDIA T4 |
| Platform | Kaggle |
pip install -U transformers accelerate peft bitsandbytes unsloth
mohdmusheer/inferra
from unsloth import FastLanguageModel
from peft import PeftModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="Qwen/Qwen2.5-3B-Instruct",
max_seq_length=1024,
load_in_4bit=True,
)
model = PeftModel.from_pretrained(
model,
"mohdmusheer/inferra",
)
FastLanguageModel.for_inference(model)
messages = [
{
"role": "user",
"content": "Explain machine learning in simple words."
}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(
text,
return_tensors="pt",
).to("cuda")
outputs = model.generate(
**inputs,
max_new_tokens=200,
)
response = tokenizer.decode(
outputs[0],
skip_special_tokens=True,
)
print(response)
max_seq_length = 1024
batch_size = 1
gradient_accumulation_steps = 8
max_steps = 500
learning_rate = 2e-4
docker build -t inferra-qwen .
docker run --gpus all -p 8000:8000 inferra-qwen
FROM pytorch/pytorch:2.4.0-cuda12.1-cudnn9-runtime
WORKDIR /app
COPY . .
RUN pip install -U \
transformers \
accelerate \
peft \
bitsandbytes \
unsloth
CMD ["python", "app.py"]
├── app.py
├── Dockerfile
├── inference.py
├── training.ipynb
└── README.md
Please follow the license terms of: