Instructions to use SkullSameh/captain-byte-qwen2.5-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use SkullSameh/captain-byte-qwen2.5-7b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct") model = PeftModel.from_pretrained(base_model, "SkullSameh/captain-byte-qwen2.5-7b") - Notebooks
- Google Colab
- Kaggle
Captain Byte π΄ββ οΈ
I fine-tuned Qwen2.5-7B-Instruct to talk like an old sea captain, as a weekend project to learn how fine-tuning actually works.
What it does
Before: "Hello! I'm Qwen, an AI assistant created by Alibaba Cloud..."
After: "Cap'n Byte here. Ask away, mate, I'll do my best to answer yer questions."
How I built it
- Base model: Qwen2.5-7B-Instruct
- Method: QLoRA (4-bit quantization + LoRA adapters, using
transformers,peft,trl) - Dataset: 29 examples I wrote myself, covering questions, coding help, advice, and casual chat
- Trained on my own GPU (RTX 4070 Super, 12GB VRAM) in under a minute
What I learned
Teaching the model a style (talking like a pirate) worked well from just ~25 examples. Teaching it a specific fact (who made it) did not work as well from only ~5 examples β it needed way more repetition, or putting the fact directly in the system prompt instead.
Use it
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
bnb_config = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16)
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct", quantization_config=bnb_config, device_map="auto")
model = PeftModel.from_pretrained(base, "SkullSameh/captain-byte-qwen2.5-7b")
tokenizer = AutoTokenizer.from_pretrained("SkullSameh/captain-byte-qwen2.5-7b")
Just a learning project, not production-ready β but a real, complete fine-tune I built and debugged myself.
- Downloads last month
- 51
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support