Instructions to use chenyijiu/qwen2.5-7b-lora-4-bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Studio
How to use chenyijiu/qwen2.5-7b-lora-4-bit 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 chenyijiu/qwen2.5-7b-lora-4-bit 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 chenyijiu/qwen2.5-7b-lora-4-bit to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for chenyijiu/qwen2.5-7b-lora-4-bit to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="chenyijiu/qwen2.5-7b-lora-4-bit", max_seq_length=2048, )
qwen2.5-7b-lora-4-bit
This is a LoRA fine-tuned model based on Qwen2.5-7B-Instruct, trained on WeChat chat records to learn a specific user's speaking style.
Model Information
- Base Model: Qwen/Qwen2.5-7B-Instruct
- Fine-tuning Method: LoRA (Low-Rank Adaptation)
- Training Framework: Unsloth
- LoRA Rank: 8
- Training Data: WeChat chat records
Usage
Load Model
from unsloth import FastLanguageModel
# Load base model
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="Qwen/Qwen2.5-7B-Instruct",
max_seq_length=1024,
dtype=None,
load_in_4bit=True,
)
# Load LoRA weights
from peft import PeftModel
model = PeftModel.from_pretrained(model, "chenyijiu/qwen2.5-7b-lora-4-bit")
# Enable inference mode
FastLanguageModel.for_inference(model)
# Generate response
inputs = tokenizer(
["<|im_start|>system\n你是一个抽象的助手。<|im_end|>\n<|im_start|>user\n你好<|im_end|>\n<|im_start|>assistant\n"],
return_tensors="pt"
).to("cuda")
outputs = model.generate(**inputs, max_new_tokens=128, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Merge LoRA Weights (Optional)
# Merge LoRA weights into base model
model = model.merge_and_unload()
# Save full model
model.save_pretrained("merged_model")
tokenizer.save_pretrained("merged_model")
Training Parameters
- Max Sequence Length: 1024
- Batch Size: 1
- Gradient Accumulation Steps: 8
- Learning Rate: 2e-4
- Epochs: 3
- Optimizer: AdamW 8-bit
License
Apache 2.0
Citation
If you use this model, please cite:
@misc{qwen2.5_7b_lora_4_bit,
author = {chenyijiu},
title = {qwen2.5-7b-lora-4-bit},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/chenyijiu/qwen2.5-7b-lora-4-bit}}
}
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support