Views
No views yet
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.gpt2-medium (355M parameters)yahma/alpaca-cleaned (only entries with empty inputs for zero-shot instruction following).1<|User|>
2[User Instruction]
3
4<|Assistant|>
5[Model Response]<|endoftext|>1from transformers import pipeline
2
3pipe = pipeline("text-generation", model="CKeibel/gpt2-medium-chat", device_map="auto")
4
5messages = [
6 {"role": "user", "content": "How do I bake a chocolate cake?"}
7]
8
9output = pipe(messages, max_new_tokens=150, do_sample=True, temperature=0.7)
10print(output[0]['generated_text'][-1]['content'])