SuperAPI AI Directory

grok-1

A large language model open-sourced by xAI under Apache-2.0 — among the first frontier-scale open-weight releases.

Open website

About this tool

Purpose

Grok-1 is a large language model open-sourced and released by xAI under the Apache-2.0 license. This repository is primarily intended for developers and researchers who want to study, load, and run the Grok-1 open-weights model.

Main Capabilities

According to the repository description, the current model specifications of Grok-1 are as follows:

  • Parameter scale: 314B
  • Architecture: Mixture of 8 Experts (MoE)
  • Expert utilization: 2 experts used per token
  • Attention heads: 48 for queries, 8 for keys/values
  • Embedding size: 6,144
  • Tokenization: SentencePiece tokenizer, 131,072 tokens
  • Additional features: Rotary Position Embedding (RoPE), support for activation sharding and 8-bit quantization
  • Maximum sequence length (context): 8,192 tokens

Usage

This repository contains JAX example code for loading and running the Grok-1 open-weights model. Before use, you need to download the checkpoint and place the ckpt-0 directory in the checkpoints directory, then run the script to load the checkpoint and sample from the model on test input.

The weights can be downloaded via a torrent client and the magnet link provided by the repository, or directly via the HuggingFace Hub.

Applicable Scenarios

Suitable for scenarios that require studying or verifying the correctness of the Grok-1 open-weights model, such as loading checkpoints, sampling on test input, and so on.

Limitations

Because the model is very large (314B parameters), testing the model with the example code requires a machine with sufficient GPU memory. The MoE layer implementation in this repository is not efficient; its implementation approach is intended to avoid using custom kernels so that the correctness of the model can be verified.

The code and the relevant Grok-1 weights in this release are licensed under the Apache 2.0 license, and this license applies only to the source files in this repository and to the Grok-1 model weights.