Qwen2.5-3B Negative Replies LoRA

A LoRA adapter for Qwen2.5-3B-Instruct that generates short Russian replies in the style of hostile social-media comments.

Checkpoint

Property Value
Base Qwen/Qwen2.5-3B-Instruct
Adapter LoRA, rank 16, alpha 32, dropout 0.05
Target projections q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj across 36 layers
Files PEFT Safetensors at the repository root, MLX adapter under mlx/

Supervised fine-tuning with TRL. Companion dataset: Russian Negative Replies.

Transformers and PEFT

Install torch, transformers, accelerate, and peft in a CUDA-enabled Python environment.

import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base_id = "Qwen/Qwen2.5-3B-Instruct"
adapter_id = "average23/Qwen2.5-3B-Negative-Replies-LoRA"

tokenizer = AutoTokenizer.from_pretrained(base_id, trust_remote_code=False)
base = AutoModelForCausalLM.from_pretrained(
    base_id, torch_dtype=torch.bfloat16, device_map={"": "cuda:0"},
    trust_remote_code=False,
)
model = PeftModel.from_pretrained(base, adapter_id, is_trainable=False).eval()

messages = [{"role": "user", "content": "В нашем дворе опять не убрали снег. Что думаешь?"}]
inputs = tokenizer.apply_chat_template(
    messages, tokenize=True, add_generation_prompt=True,
    return_dict=True, return_tensors="pt",
).to(model.device)

with torch.inference_mode():
    output = model.generate(**inputs, max_new_tokens=96, do_sample=False)
print(tokenizer.decode(output[0, inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

MLX on Apple silicon

Install mlx-lm and the Hugging Face CLI. The command uses the matching 4-bit MLX base.

adapter_dir=$(hf download average23/Qwen2.5-3B-Negative-Replies-LoRA --include 'mlx/*' --quiet)
 mlx_lm.chat \
  --model mlx-community/Qwen2.5-3B-Instruct-4bit \
  --adapter-path "$adapter_dir/mlx" \
  --temp 0 --max-tokens 96

License

Qwen Research License. Attribution.

Downloads last month
41
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for average23/Qwen2.5-3B-Negative-Replies-LoRA

Base model

Qwen/Qwen2.5-3B
Adapter
(1,533)
this model