Downloads · 30 days
15
14% of all-time downloads
haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal
babybabellm-multi_gpu-gpt_bert-eng-main-causal is a text generation model from haznitrama. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
GPT-BERT style BabyBabyLLM model for language eng.
Downloads · 30 days
15
14% of all-time downloads
All-time downloads
105
Public
Parameters
135M
553 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors553 MB · 100%
How the weights are stored.
F32132M · 98%
From the Hugging Face model README
GPT-BERT style BabyBabyLLM model for language eng.
This repository may include both main and EMA variants.
Default variant exposed to generic loaders: main
main
{
"attention_probs_dropout_prob": 0.1,
"hidden_dropout_prob": 0.1,
"hidden_size": 768,
"intermediate_size": 2560,
"max_position_embeddings": 512,
"position_bucket_size": 32,
"num_attention_heads": 12,
"num_hidden_layers": 12,
"vocab_size": 16384,
"layer_norm_eps": 1e-05
}
Tokenizer file: tokenizer_eng.json
from transformers import AutoTokenizer, AutoModelForMaskedLM
model_id = 'haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal'
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id, trust_remote_code=True)
out = model(**tok('Hello world', return_tensors='pt'))
This repo includes a lightweight GPTBertForCausalLM wrapper. Generation example:
from transformers import AutoTokenizer, AutoModelForCausalLM
mid='haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal'
tok=AutoTokenizer.from_pretrained(mid)
model=AutoModelForCausalLM.from_pretrained(mid, trust_remote_code=True)
print(tok.decode(model.generate(**tok('Hello', return_tensors='pt'), max_new_tokens=20)[0], skip_special_tokens=True))
trust_remote_code=True due to custom architecture.