πŸ€– GPT-2 Medium Chat (SFT)

πŸ“– Overview

This model is a supervised fine-tuned (SFT) version of the classic gpt2-medium. It was created as an educational dummy project to learn how to transform a standard base language model into an instruction-following chat assistant.

βš™οΈ Model Details

  • Base Model: gpt2-medium (355M parameters)
  • Training Method: Supervised Fine-Tuning (SFT)
  • Dataset: A subset of yahma/alpaca-cleaned (only entries with empty inputs for zero-shot instruction following).
  • Objective: Teach the model a structured conversational format.

πŸ’¬ Chat Template

The model's tokenizer includes a custom Jinja chat template. It uses the following structure:

<|User|>
[User Instruction]

<|Assistant|>
[Model Response]<|endoftext|>

πŸš€ How to Use

You can easily load and test this model using the Hugging Face pipeline. The chat template is applied automatically:

from transformers import pipeline

pipe = pipeline("text-generation", model="CKeibel/gpt2-medium-chat", device_map="auto")

messages = [
    {"role": "user", "content": "How do I bake a chocolate cake?"}
]

output = pipe(messages, max_new_tokens=150, do_sample=True, temperature=0.7)
print(output[0]['generated_text'][-1]['content'])

⚠️ Disclaimer

This is a dummy/learning project created to understand the mechanics of LoRA and SFT. It is not intended for production use, and its reasoning capabilities are strictly limited to what a 355M parameter model can achieve.

Downloads last month
99
Safetensors
Model size
0.4B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for CKeibel/gpt2-medium-chat

Finetuned
(179)
this model