Downloads · 30 days
3
10% of all-time downloads
haznitrama/babybabellm-multi_gpu-gpt_bert-eng
babybabellm-multi_gpu-gpt_bert-eng 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.
GPT-BERT style BabyBabyLLM monolingual model for language eng.
Downloads · 30 days
3
10% of all-time downloads
All-time downloads
31
Public
Parameters
123M
2 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin1.5 GB · 60%
How the weights are stored.
F32119M · 97%
From the Hugging Face model README
GPT-BERT style BabyBabyLLM monolingual model for language eng.
This repository mirrors the layout of the multi-all reference models: it may contain both main and EMA variants.
Default variant exposed to generic loaders: ema
ema, 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,
"auto_map": {
"AutoConfig": "configuration_gpt_bert.GPTBertConfig",
"AutoModel": "modeling_gpt_bert.GPTBertForMaskedLM",
"AutoModelForCausalLM": "modeling_gpt_bert.GPTBertForMaskedLM",
"AutoModelForMaskedLM": "modeling_gpt_bert.GPTBertForMaskedLM"
},
"return_dict": true,
"output_hidden_states": false,
"torchscript": false,
"dtype": "float32",
"pruned_heads": {},
"tie_word_embeddings": true,
"chunk_size_feed_forward": 0,
"is_encoder_decoder": false,
"is_decoder": false,
"cross_attention_hidden_size": null,
"add_cross_attention": false,
"tie_encoder_decoder": false,
"architectures": [
"GPTBertForMaskedLM"
],
"finetuning_task": null,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"task_specific_params": null,
"problem_type": null,
"tokenizer_class": null,
"prefix": null,
"bos_token_id": null,
"pad_token_id": null,
"eos_token_id": null,
"sep_token_id": null,
"decoder_start_token_id": null,
"max_length": 20,
"min_length": 0,
"do_sample": false,
"early_stopping": false,
"num_beams": 1,
"num_beam_groups": 1,
"diversity_penalty": 0.0,
"temperature": 1.0,
"top_k": 50,
"top_p": 1.0,
"typical_p": 1.0,
"repetition_penalty": 1.0,
"length_penalty": 1.0,
"no_repeat_ngram_size": 0,
"encoder_no_repeat_ngram_size": 0,
"bad_words_ids": null,
"num_return_sequences": 1,
"output_scores": false,
"return_dict_in_generate": false,
"forced_bos_token_id": null,
"forced_eos_token_id": null,
"remove_invalid_values": false,
"exponential_decay_length_penalty": null,
"suppress_tokens": null,
"begin_suppress_tokens": null,
"_name_or_path": "",
"transformers_version": "4.56.1",
"tf_legacy_loss": false,
"use_bfloat16": false,
"model_type": "gpt_bert",
"output_attentions": false
}
Tokenizer file: tokenizer_eng.json
from transformers import AutoTokenizer, AutoModelForMaskedLM
model_id = 'haznitrama/babybabellm-multi_gpu-gpt_bert-eng'
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id, trust_remote_code=True)
out = model(**tok('Hello world', return_tensors='pt'))
Select a specific variant explicitly (when both present):
# Load EMA weights explicitly if both are present
from safetensors.torch import load_file
import torch
from transformers import AutoConfig, AutoModelForMaskedLM
model_id = 'haznitrama/babybabellm-multi_gpu-gpt_bert-eng'
config = AutoConfig.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForMaskedLM.from_config(config, trust_remote_code=True)
state_dict = torch.load('pytorch_model.bin') # or load_file('model_ema.safetensors')
model.load_state_dict(state_dict, strict=False)
pytorch_model.bin added for legacy tools.trust_remote_code=True due to custom architecture.