Text Generation
Transformers
Safetensors
Portuguese
qwen3
Generated from Trainer
sft
trl
cuphead
games
portuguese
conversational
text-generation-inference
Instructions to use Er1ckRg/cuphead-qwen3-1.7b-finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Er1ckRg/cuphead-qwen3-1.7b-finetuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Er1ckRg/cuphead-qwen3-1.7b-finetuned") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Er1ckRg/cuphead-qwen3-1.7b-finetuned") model = AutoModelForCausalLM.from_pretrained("Er1ckRg/cuphead-qwen3-1.7b-finetuned", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Er1ckRg/cuphead-qwen3-1.7b-finetuned with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Er1ckRg/cuphead-qwen3-1.7b-finetuned" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Er1ckRg/cuphead-qwen3-1.7b-finetuned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Er1ckRg/cuphead-qwen3-1.7b-finetuned
- SGLang
How to use Er1ckRg/cuphead-qwen3-1.7b-finetuned with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Er1ckRg/cuphead-qwen3-1.7b-finetuned" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Er1ckRg/cuphead-qwen3-1.7b-finetuned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Er1ckRg/cuphead-qwen3-1.7b-finetuned" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Er1ckRg/cuphead-qwen3-1.7b-finetuned", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Er1ckRg/cuphead-qwen3-1.7b-finetuned with Docker Model Runner:
docker model run hf.co/Er1ckRg/cuphead-qwen3-1.7b-finetuned
cuphead-qwen3-1.7b-finetuned
Versão fine-tuned do Qwen/Qwen3-1.7B especializada em responder perguntas sobre o jogo Cuphead e sua DLC The Delicious Last Course, em português.
O modelo foi treinado com SFT (Supervised Fine-Tuning) usando TRL sobre o dataset Er1ckRg/cuphead_basico, cobrindo chefes, mecânicas, personagens, armas, amuletos e conteúdo da DLC.
Uso
from transformers import pipeline
generator = pipeline(
"text-generation",
model="Er1ckRg/cuphead-qwen3-1.7b-finetuned",
device="cuda",
)
mensagens = [
{
"role": "system",
"content": (
"Você é um especialista no jogo Cuphead e sua DLC The Delicious Last Course. "
"Responda perguntas de forma precisa e factual sobre a campanha, chefes, "
"mecânicas e conteúdo do jogo."
),
},
{"role": "user", "content": "Quem são os protagonistas de Cuphead?"},
]
# Qwen3 gera tokens de thinking por padrão — filtre o bloco <think> se não quiser
output = generator(mensagens, max_new_tokens=512, do_sample=False)[0]
resposta = output["generated_text"][-1]["content"]
# Remove o bloco de raciocínio interno caso apareça
if "</think>" in resposta:
resposta = resposta.split("</think>")[-1].strip()
print(resposta)
Dataset
Treinado sobre Er1ckRg/cuphead_basico, um dataset de perguntas e respostas factuais em português cobrindo:
- Chefes da campanha principal e da DLC
- Personagens jogáveis (Cuphead, Mugman, Ms. Chalice)
- Armas, amuletos e mecânicas de jogo
- Modo cooperativo e sistema de ranking
Formato: chat com roles system / user / assistant.
Procedimento de treino
- Método: SFT (Supervised Fine-Tuning)
- Loss: NLL apenas nos tokens do assistente (
assistant_only_loss=True) - Épocas: 3
- Hardware: NVIDIA Tesla T4 (16 GB)
- Precisão: FP16
Versões dos frameworks
- TRL: 1.7.0
- Transformers: 5.12.1
- PyTorch: 2.10.0+cu128
- Datasets: 4.8.5
- Tokenizers: 0.22.2
Limitações
- Especializado em Cuphead — perguntas fora desse domínio serão respondidas com base no conhecimento geral do Qwen3-1.7B, sem garantia de qualidade.
- Dataset de tamanho reduzido — pode não cobrir situações muito específicas ou raras do jogo.
- Respostas em português; desempenho em outros idiomas não foi avaliado.
Citações
@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