This is a randomly initialized tiny model based on hpcai-tech/grok-1 for testing and debugging.

Feature Source This repo
Parameters 316.5B (65 BF16 .bin shards, 632.99GB; source ships no safetensors) 10.01M
Weight files 65 pytorch_model .bin shards, 632.99GB 20.04 MB (model.safetensors)
Layers 64, all MoE 4, all MoE
Residual width / FFN width 6,144 / 32,768 64 / 256
Q heads / KV heads / head_dim 48 / 8 (GQA 6:1) / 128 2 / 1 (GQA 2:1) / 32
Experts / top-k 8 / 2 Same
Attention tanh-capped logits, custom scale constants Same
Vocabulary rows / embedding tying 131,072 / tied Same
Stored precision BF16 Same

Transformers has no Grok-1 implementation, so the pinned upstream remote code is included. It predates Transformers 5.x and ships targeted compatibility shims: an empty all_tied_weights_keys map and a bridge between its tuple KV cache and the modern DynamicCache, so cached generation works. Load with trust_remote_code=True.

SGLang 0.5.10 has a native Grok1 implementation, but it cannot serve this checkpoint: at TP>1 it loads grok-1's pre-sharded weight files (*-{rank:03d}.bin or *-TP-{rank:03d}.safetensors), and at TP=1 the KV pool rejects the qkv layout (view size is not compatible with input tensor's size and stride in memory_pool.set_kv_buffer). The two query heads also cap TP at 2. Serving evidence for this repository is the Transformers example.

File path Size
model.safetensors 20.0MB

Example usage

Transformers (βœ… verified)

Load the included pinned Grok-1 implementation 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, trust_remote_code=True, 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/grok-1")

Creating this repo

Change log

  • 2026-11-07: Initial version rebuilt from the official hpcai-tech/grok-1 source, shipping its pinned remote code with Transformers 5.x DynamicCache compatibility.

This repo is generated by GPT-6.1-Sol.

Downloads last month
-
Safetensors
Model size
10M 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/grok-1

Finetuned
(1)
this model