Downloads · 30 days
250
22% of all-time downloads
Moeblack/Qwen3.8-27B-chinese-taste-sft-lora
Qwen3.8-27B-chinese-taste-sft-lora is a text generation model from Moeblack. Use it when you need the model to write or continue text. The card lists the license as other.
中文小说向的 LoRA 适配器,基于 unsloth/Qwen3.8-27B。 训练语料是作者偏好的中文长篇叙事作品,合计约 8000 万字,从中抽取序列级样本完成 SFT(详情见下文)。
Downloads · 30 days
250
22% of all-time downloads
All-time downloads
1.1K
Public
Repo size
58 MB
Likes
19
Public
Click a slice to open those files.
.safetensors39.9 MB · 69%
From the Hugging Face model README
中文小说向的 LoRA 适配器,基于 unsloth/Qwen3.8-27B。
训练语料是作者偏好的中文长篇叙事作品,合计约 8000 万字,从中抽取序列级样本完成 SFT(详情见下文)。
这是一个 agent 模型:按常规方式使用即可——标准对话、续写、系统提示注入都正常,不需要构造特殊提示词。
enable_thinking=false 的非思考路径。from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
tok = AutoTokenizer.from_pretrained("unsloth/Qwen3.8-27B")
base = AutoModelForCausalLM.from_pretrained(
"unsloth/Qwen3.8-27B", torch_dtype="bfloat16")
model = PeftModel.from_pretrained(base, "Moeblack/Qwen3.8-27B-chinese-taste-sft-lora")
model.eval()
prompt = tok.apply_chat_template(
[{"role": "user", "content": "……"}],
add_generation_prompt=True, tokenize=True, enable_thinking=False)
out = model.generate(
torch.tensor(prompt["input_ids"]).unsqueeze(0),
max_new_tokens=800, do_sample=True, temperature=0.8,
top_p=0.9, top_k=40, min_p=0.05, repetition_penalty=1.1)
print(tok.decode(out[0], skip_special_tokens=True))
llama.cpp 用户:本仓库已提供预转换 GGUF(qwen3.8-27b-chinese-taste-sft-lora-q8_0.gguf),直接下载并以 --lora 挂载到你的基座 GGUF 即可;也可自行从 PEFT 权重转换:
python convert_lora_to_gguf.py <adapter_dir> \
--base-model-id "Qwen/Qwen3.8-27B" \
--outfile lora.gguf --outtype q8_0
(转换脚本位于 llama.cpp 仓库,--base-model-id 仅用于读取模型结构,与训练基座无关。)
同一提示词下的自然生成对比(左为基座 Base,右为本适配器 LoRA):
| 基座 (Base) | 本适配器 (LoRA) |
|---|---|
![]() | ![]() |
| 项 | 值 |
|---|---|
| 基座 | unsloth/Qwen3.8-27B(bfloat16,单卡 95GB) |
| 方法 | LoRA:r=2, α=4, dropout=0, 目标 q/k/v/o/gate/up/down |
| 数据 | 823 个序列 × 16 变体 ≈ 13168 对(1 epoch,≈20.3M tokens,max_seq 8000) |
| 优化 | 每步 4 对(micro 1 × grad_accum 4),AdamW fused,wd 0.001 |
| 调度 | WSD:warmup 100 → 1e-4 平台 → decay 至 4e-6(3292 步) |
| 框架 | TRL SFTTrainer 1.10 / transformers 5.14.1 / PEFT 0.20 |
指标定义:按句末标点切分,单句 ≥40 字计为长句;对比采用固定锚 prompt,采样参数保持一致(temp 0.8/top_p 0.9/top_k 40/min_p 0.05/rep 1.1)。 同口径自然生成下,长句率从基座的 ~10% 提升到 ~25%。
所有权利保留(All Rights Reserved):本仓库权重仅供下载者个人研究使用,商用、再分发或二次修改后传播均需获得作者许可。使用本适配器时,也须遵守基座模型(对应 Qwen 系列)的许可证条款。
Moeblack/Qwen3.8-27B-chinese-taste-lora)是 DAPT 文风预训练版,本版本是 SFT 指令版,两者可独立使用,也可叠加;