How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="tiny-random/bloom")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("tiny-random/bloom")
model = AutoModelForCausalLM.from_pretrained("tiny-random/bloom", device_map="auto")
Quick Links

This is a randomly initialized tiny model based on bigscience/bloom-560m for testing and debugging.

Feature Source This repo
Checkpoint tensor elements 559.21M F16 32.91M BF16
Safetensors weight files 1.12 GB (model.safetensors) 65.82 MB (model.safetensors)
Layers 24 4
Hidden width / FFN width 1,024 / 4,096 128 / 512
Attention heads / head_dim 16 / 64 4 / 32
Position encoding ALiBi Same
Vocabulary rows / embedding tying 250,880 / tied Same
Stored precision FP16 BF16

The 250,880-row tied token matrix sets a lower bound of 64.23MB at hidden width 128: TP=4 requires four attention heads at head_dim 32, so the 30MB best-effort target does not fit without dropping tensor parallelism. The source BLOOM RAIL LICENSE is copied.

SGLang 0.5.10 registers no native implementation for BloomForCausalLM (no EntryClass in sglang/srt/models), so only the generic TransformersForCausalLM fallback exists, which does not shard the model across tensor-parallel ranks. Serving evidence for this repository is the Transformers example.

File path Size
model.safetensors 65.8MB

Example usage

Transformers (βœ… verified)

def run_transformers(model_id: str):
    import torch
    from transformers import AutoModelForCausalLM, AutoTokenizer

    model_id = str(model_id)
    tokenizer = AutoTokenizer.from_pretrained(model_id)
    model = (
        AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, attn_implementation="eager").eval().cuda()
    )
    inputs = tokenizer("The quick brown fox jumps over the lazy dog.", return_tensors="pt").to("cuda")
    with torch.no_grad():
        assert torch.isfinite(model(**inputs).logits).all()
        output = model.generate(**inputs, do_sample=False, max_new_tokens=8)
    print(tokenizer.decode(output[0], skip_special_tokens=True))


if __name__ == "__main__":
    run_transformers(model_id="tiny-random/bloom")

Creating this repo

Change log

  • 2026-11-07: Initial version rebuilt from the official bigscience/bloom-560m source with four layers and head dimension 32.

This repo is generated by GPT-6.1-Sol.

Downloads last month
66
Safetensors
Model size
32.9M params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for tiny-random/bloom

Finetuned
(38)
this model

Collection including tiny-random/bloom