Downloads · 30 days
9
10% of all-time downloads
vivienfanghua/my-bert-model
my-bert-model is a text generation model from vivienfanghua. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
from transformers import AutoTokenizer, AutoModelForCausalLM
Downloads · 30 days
9
10% of all-time downloads
All-time downloads
90
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("openai/gpt-oss-20b") model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-20b") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))