enet45/qwen2.5-7b-ja2zh-lora-v1.1

来源:🤗text-generationapache-2.0激活 7B334 MBsafetensors✓ 2 个校验和231 天前更新
帮助这个模型通过 Pirate Face 分发

模型卡、文件列表和校验和已在此收录。如果你持有文件并有权分享,可以提交种子,让其他人从节点下载。

获取来源文件需要 Hugging Face 批准。
为此模型做种

Qwen2.5-7B-LoRA-SFT

This repository contains a LoRA (Low-Rank Adaptation) adapter for Qwen2.5-7B-Instruct, fine-tuned using LLaMA Factory.

Model Description

  • Base Model: Qwen/Qwen2.5-7B-Instruct
  • Method: LoRA Fine-tuning (SFT)
  • Language: Chinese / Japanese
  • Training Date: February 28, 2026

Training Hyperparameters

The following hyperparameters were used during training:

  • Learning Rate: 3e-5
  • LRScheduler: Cosine
  • Epochs: 5.0
  • Per Device Batch Size: 2
  • Gradient Accumulation Steps: 4
  • Optimizer: AdamW
  • Mixed Precision: BF16
  • Cutoff Length: 128
  • LoRA Rank (r): 32
  • LoRA Alpha: 32
  • LoRA Dropout: 0.05
  • LoRA Target Modules: all-linear

Training Results

The model underwent significant training with the following final metrics:

Metric Value
Train Loss 0.6827
Eval Loss 0.8554
Total FLOPs 1.20e18
Training Runtime 16.02 Hours (57,524s)
Tokens Seen 36,450,400

Evaluation Metrics (Test Set)

Post-training evaluation on the test set yielded the following scores:

  • BLEU (raw): 75.98
  • BLEU (Strict): 75.98
  • chrF (raw): 91.37
  • chrF (Strict): 91.37
  • COMET: 0.7449
  • Average Response Length (Chars): 8.4

Usage

You can use this adapter with the peft and transformers libraries:

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

base_model_path = "Qwen/Qwen2.5-7B-Instruct"
adapter_path = "enet45/qwen2.5-7b-ja2zh-lora-v1.1"

tokenizer = AutoTokenizer.from_pretrained(base_model_path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    base_model_path,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True
)
model = PeftModel.from_pretrained(model, adapter_path)

inputs = tokenizer("Introduce yourself in Chinese.", return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Limitations and Bias

This model is a LoRA adapter. It inherits the risks and biases of the base Qwen3-8B model. Users should perform their own safety testing before deploying in production environments.