Downloads · 30 days
12
31% of all-time downloads
iori-ltn/nanj-qwen2.5-3b-merged
nanj-qwen2.5-3b-merged is a text generation model from iori-ltn. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
このモデルは Qwen/Qwen2.5-3B-Instruct をベースに、 open2ch データで DAPT、 livejupiter データで SFT を行った LoRA です。
Downloads · 30 days
12
31% of all-time downloads
All-time downloads
39
Public
Repo size
191 MB
Likes
2
Public
Click a slice to open those files.
.safetensors148 MB · 51%
From the Hugging Face model README
このモデルは Qwen/Qwen2.5-3B-Instruct をベースに、
open2ch データで DAPT、
livejupiter データで SFT を行った LoRA です。
なんJ風の会話生成に最適化されています。
from unsloth import FastLanguageModel
# BaseModek
base = "Qwen/Qwen2.5-3B-Instruct"
# Load LoRa Adapter
model, tok = FastLanguageModel.from_pretrained(base, load_in_4bit=True, max_seq_length=1024)
model.load_adapter("your-username/nanj-qwen2.5-3b-merged")
# example
msgs = [{"role":"user", "content":"藤浪復活したら阪神どうなる?"}]
prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
out = model.generate(
**tok(prompt, return_tensors="pt").to(model.device),
max_new_tokens=128, do_sample=True, top_p=0.9, temperature=0.8
)
print(tok.decode(out[0], skip_special_tokens=True).split(prompt)[-1].strip())
本モデルの DAPT / SFT は どちらも LoRA を用いて実施しました。
Phase 1: DAPT (LoRA)
open2ch (all-corpus-cleaned) を用いた継続事前学習(次トークン予測)
→ open2ch の語彙・言い回しにモデルを適応
Phase 2: SFT (LoRA)
livejupiter-cleaned から作成した会話ペアで教師あり微調整
→ なんJ的な対話スタイルを獲得
Cite TRL as:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}