CoolFace
Modelpublic

tendrivalentin/witcher3-qwen35-08b-sft-ptbr

sourceHugging Faceapache-2.0updated 3mo agoView on Hugging Face
0likes11downloads
Model Card

Witcher 3 Qwen3.5-0.8B SFT (Portuguese)

Fine-tuned version of Qwen/Qwen3.5-0.8B on the witcher3-dataset-ptbr dataset for Witcher 3 themed conversations in Brazilian Portuguese.

Hugging Face Hub: tendrivalentin/witcher3-qwen35-08b-sft-ptbr

Quick Start

From Hugging Face Hub

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("tendrivalentin/witcher3-qwen35-08b-sft-ptbr")
tokenizer = AutoTokenizer.from_pretrained("tendrivalentin/witcher3-qwen35-08b-sft-ptbr")

messages = [{"role": "user", "content": "Quem é Ciri e qual é a sua importância?"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=150, temperature=0.7, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

From Local Path

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_path = "runs/sft-witcher3-ptbr-qwen35-08b-full"
model = AutoModelForCausalLM.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained(model_path)

messages = [{"role": "user", "content": "Fale sobre Yennefer."}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=150, temperature=0.7, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Training Results

MetricValue
Train Loss0.660
Train Accuracy85.07%
Eval Loss (best)2.391
Eval Accuracy53.93%
Training Time~35 min
HardwareApple Silicon (MPS)

Training Procedure

This model was trained with SFT.

Framework versions

  • —TRL: 1.7.0
  • —Transformers: 5.13.0
  • —Pytorch: 2.12.1
  • —Datasets: 5.0.0
  • —Tokenizers: 0.22.2

Citations

Cite TRL as:

bibtex
@software{vonwerra2020trl,
  title   = {{TRL: Transformers Reinforcement Learning}},
  author  = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
  license = {Apache-2.0},
  url     = {https://github.com/huggingface/trl},
  year    = {2020}
}