Downloads · 30 days
3
2% of all-time downloads
haznitrama/babybabellm-gpt_bert-small
babybabellm-gpt_bert-small is a machine learning model from haznitrama. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Rehosted from suchirsalhan/babybabellm-multismall with standardized remote code and automap. - Original modeltype preserved. - Default AutoModel mapping points to GPTBertForCausalLM. - Added both causal & masked LM wr…
Downloads · 30 days
3
2% of all-time downloads
All-time downloads
174
Public
Repo size
4.2 GB
Likes
0
Public
Click a slice to open those files.
.bin4.2 GB · 100%
From the Hugging Face model README
Rehosted from suchirsalhan/babybabellm-multismall with standardized remote code and auto_map.
model_type preserved.Example:
from transformers import AutoTokenizer, AutoModel
m='haznitrama/babybabellm-gpt_bert-small'
tok=AutoTokenizer.from_pretrained(m, trust_remote_code=True)
model=AutoModel.from_pretrained(m, trust_remote_code=True)
print(model(**tok('Hello world', return_tensors='pt')).logits.shape)
Generation:
from transformers import AutoModelForCausalLM, AutoTokenizer
m='haznitrama/babybabellm-gpt_bert-small'
tok=AutoTokenizer.from_pretrained(m, trust_remote_code=True)
model=AutoModelForCausalLM.from_pretrained(m, trust_remote_code=True)
print(tok.decode(model.generate(**tok('Hello', return_tensors='pt'), max_new_tokens=20)[0], skip_special_tokens=True))