English | 中文
Qwen3.8-27B-ZOOT-Distill-LoRA is a domain-specialized LoRA adapter for Qwen/Qwen3.8-27B, distilled from the DeepSeek V4 Flash Vision Exp teacher model specifically for the ZOOT ecosystem (Arknights / Terra interactive operator roleplay and narrative systems).
Instead of standard hard-label Supervised Fine-Tuning (SFT), this adapter is trained via cross-tokenizer logit distillation, transferring the character voice, deep reasoning (<think>...</think>), and structured JSON generation capabilities of the teacher model into the 27B backbone.
See https://huggingface.co/docs/trl/gold_trainer for additional details.
16,384 tokens.| Attribute | Specification |
|---|---|
| Adapter Type | PEFT LoRA (CAUSAL_LM) |
| Base Model | Qwen/Qwen3.8-27B |
| Teacher Model | DeepSeek V4 Flash Vision Exp |
| Data Mixture | 80% Chat + 20% Task |
| LoRA Rank / Alpha | r = 16, lora_alpha = 32, lora_dropout = 0.0 |
| Context Length | Up to 16,384 tokens |
| Reasoning Format | <think>\n...\n</think>\n\n{...} |
vllm serve Qwen/Qwen3.8-27B \
--enable-lora \
--lora-modules zoot-qwen38=/path/to/Qwen3.8-27B-ZOOT-LoRA \
--max-lora-rank 16 \
--max-model-len 16384 \
--trust-remote-code
Query via the OpenAI-compatible /v1/chat/completions endpoint:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
response = client.chat.completions.create(
model="zoot-qwen38",
messages=[
{"role": "system", "content": "You are Amiya, leader of Rhodes Island. Respond in the ZOOT structured JSON format."},
{"role": "user", "content": "阿米娅,这么晚了还在整理罗德岛的行动报告吗?"}
],
temperature=0.7,
top_p=0.95,
max_tokens=1024,
)
print(response.choices[0].message.content)
transformers + peftNote: Loading
Qwen3.8-27BviaAutoModelForCausalLMautomatically loads only the text backbone (Qwen3_5ForCausalLM) and skips the unused vision tower.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "Qwen/Qwen3.8-27B"
adapter_id = "baysonfox/Qwen3.8-27B-ZOOT-LoRA"
tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
messages = [
{"role": "system", "content": "你是罗德岛的公开领袖阿米娅。请根据设定使用 ZOOT JSON 格式回复博士。"},
{"role": "user", "content": "阿米娅,今天的审阅文件我已经全部签完字了,休息一下吧。"}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=1024,
temperature=0.7,
top_p=0.95,
do_sample=True,
)
generated_ids = outputs[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(generated_ids, skip_special_tokens=True))
<think>
博士刚刚完成了今天所有的文件审阅,主动提出一起休息。作为罗德岛的领袖和博士最亲近的助手,我应该先关心博士的身体状况,表达对他辛苦工作的感激,同时自然地流露出想要多陪伴他的心情……
</think>
{
"reply": [
{
"type": "scenario",
"content": "办公室里的台灯散发着柔和的暖光,阿米娅闻言停下了手中整理源石技艺卷宗的动作,长长的兔耳轻轻动了动。她走上前将桌角的文件收拢整齐,随后替博士泡了一杯温热的红茶。"
},
{
"type": "dialogue",
"content": "辛苦您了,博士!看到您把这么多积压的报告都处理完,我也松了一口气呢。来,先喝口热茶暖暖身子吧,今晚接下来的时间,我都会一直陪在您身边的。"
}
],
"trust": 2,
"mood": "gentle"
}
<think>...</think> block before decoding the JSON body.Qwen/Qwen3.8-27B