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/dbrx")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

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

This is a randomly initialized tiny model based on alpindale/dbrx-instruct for testing and debugging.

Feature Source This repo
Checkpoint tensor elements 131.60B BF16 31.47M BF16
Safetensors weight files 263.19 GB (61 files) 62.94 MB (model.safetensors)
Layers 40, all MoE 4, all MoE
Residual width / per-expert FFN (1.75x) 6,144 / 10,752 128 / 224
Q heads / KV heads / head_dim 48 / 8 (GQA 6:1) / 128 4 / 4 (MHA) / 32
Experts / top-k 16 / 4 Same
QKV clipping / RoPE base clip_qkv 8 / 500,000 Same
Vocabulary rows / embedding tying 100,352 / untied Same
Stored precision BF16 Same

The canonical databricks/dbrx-instruct repository was removed from the Hub; the source revision points to alpindale/dbrx-instruct, the widely used byte-complete mirror, for the tiktoken tokenizer and pinned metadata. The model itself is built with the native Transformers DBRX implementation (the source remote code is not shipped). The untied 100,352-row token matrices require 51.38MB at hidden width 128, a proven exception to the 30MB best-effort target; the source 6:1 GQA ratio cannot fit four TP=4-legal heads.

File path Size
model.safetensors 62.9MB

Example usage

Transformers (βœ… verified)

The tokenizer loads the included tiktoken.py helper with trust_remote_code=True.

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

    model_id = str(model_id)
    tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
    model = (
        AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, attn_implementation="sdpa").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/dbrx")

SGLang (βœ… verified)

SGLang 0.5.10 ships a native DbrxForCausalLM implementation; serve the tiny checkpoint with tensor parallelism:

sglang serve --model-path tiny-random/dbrx --tp 4 \
  --dtype bfloat16 --context-length 1024 --host 0.0.0.0 --port 30000 \
  --trust-remote-code

Send an OpenAI completion request:

from openai import OpenAI

client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")
resp = client.completions.create(
    model="tiny-random/dbrx", prompt="The quick brown fox", max_tokens=8, temperature=0
)
print(resp.choices[0].text)

Creating this repo

Change log

  • 2026-11-07: Initial version. The official databricks/dbrx-instruct repository is no longer available on the Hub; this rebuild uses the complete unmodified-weight mirror alpindale/dbrx-instruct for tokenizer assets and pinned source metadata, and the native Transformers DBRX implementation rather than the source remote code.

This repo is generated by GPT-6.1-Sol.

Downloads last month
149
Safetensors
Model size
31.5M 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/dbrx

Finetuned
(1)
this model

Collection including tiny-random/dbrx