Downloads · 30 days
0
BruceLee1234/qwen2-7b-battery-lora
qwen2-7b-battery-lora is a machine learning model from BruceLee1234. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a LoRA fine-tuned Qwen2-7B model trained on a small custom battery-related dataset (232 Q&A pairs). The goal of this project is to learn how to fine-tune large language models using Unsloth and LoRA adapters.
Downloads · 30 days
0
Access
Public
Updated Aug 6, 2025
Repo size
173 MB
Likes
0
Public
Click a slice to open those files.
.safetensors162 MB · 91%
From the Hugging Face model README
This is a LoRA fine-tuned Qwen2-7B model trained on a small custom battery-related dataset (232 Q&A pairs).
The goal of this project is to learn how to fine-tune large language models using Unsloth and LoRA adapters.
Note: This model is part of my learning phase and not meant for production use.
It demonstrates end-to-end fine-tuning, saving, and sharing on Hugging Face.
Very small dataset → the model may not generalize well
Answers could be inaccurate or hallucinated outside the training scope
Not evaluated on a formal benchmark yet
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="your-username/qwen2-7b-battery-lora",
max_seq_length=2048,
load_in_4bit=True,
device_map="auto"
)
prompt = """Below is an instruction that describes a task.
### Instruction:
What does ManufacturerAccess(0x57) indicate?
### Input:
### Response:
"""
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
'''