Instructions to use AbhilekhMeda/qwen3-1.7b-multiturn-ultrachat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AbhilekhMeda/qwen3-1.7b-multiturn-ultrachat with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AbhilekhMeda/qwen3-1.7b-multiturn-ultrachat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Qwen3-1.7B Multi-turn SFT on UltraChat
This repo stores the training script and will receive checkpoints from an SFT run of Qwen/Qwen3-1.7B on HuggingFaceH4/ultrachat_200k.
Training objective
Improve context maintenance across several exchanges by fine-tuning on a multi-turn conversational dataset while computing loss only on assistant turns.
Dataset choice
Selected dataset: HuggingFaceH4/ultrachat_200k
Why:
- verified multi-turn
messagesstructure withrole/content - widely used conversational SFT dataset
- directly compatible with TRL
SFTTrainer
Training details
- Trainer:
trl.SFTTrainer - Dataset format: conversational language modeling (
messages) - Loss masking:
assistant_only_loss=True - Packing:
Falseto preserve dialogue boundaries - Chat template handling: rely on TRL's patched Qwen3 training template for assistant-token masking
Key correctness point
For Qwen3, current TRL docs state that when assistant_only_loss=True is enabled, TRL automatically swaps in a patched Qwen3 training chat template containing {% generation %} / {% endgeneration %} markers so only assistant tokens contribute to the loss.
References
- TRL SFT docs: https://huggingface.co/docs/trl/sft_trainer
- TRL chat templates docs: https://huggingface.co/docs/trl/chat_templates
- Dataset: https://huggingface.co/datasets/HuggingFaceH4/ultrachat_200k
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support