Instructions to use haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal", trust_remote_code=True)# Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal
- SGLang
How to use haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal with Docker Model Runner:
docker model run hf.co/haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal
haznitrama/babybabellm-multi_gpu-gpt_bert-eng-main-causal
GPT-BERT style BabyBabyLLM model for language eng.
This repository may include both main and EMA variants.
Default variant exposed to generic loaders: main
Variants Available
main
Files
- model.safetensors (alias of default variant)
Configuration
{
"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
Quick Usage
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'))
Causal LM Wrapper
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))
Notes
- Converted on 2025-09-27T15:21:53.977598+00:00
- Weights are the exact trained parameters; no new layers were initialized.
- Requires
trust_remote_code=Truedue to custom architecture.
- Downloads last month
- 1