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

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

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

Metric Value
Train Loss 0.660
Train Accuracy 85.07%
Eval Loss (best) 2.391
Eval Accuracy 53.93%
Training Time ~35 min
Hardware Apple 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:

@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}
}
Downloads last month
9
Safetensors
Model size
0.8B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for tendrivalentin/witcher3-qwen35-08b-sft-ptbr

Finetuned
(351)
this model

Dataset used to train tendrivalentin/witcher3-qwen35-08b-sft-ptbr