mirror of
https://github.com/xai-org/grok-1.git
synced 2024-11-23 12:09:52 +03:00
Merge 874c2e941c
into d6d9447e2d
This commit is contained in:
commit
2ee3f9a789
21
README.md
21
README.md
@ -4,21 +4,27 @@ This repository contains JAX example code for loading and running the Grok-1 ope
|
|||||||
|
|
||||||
Make sure to download the checkpoint and place the `ckpt-0` directory in `checkpoints` - see [Downloading the weights](#downloading-the-weights)
|
Make sure to download the checkpoint and place the `ckpt-0` directory in `checkpoints` - see [Downloading the weights](#downloading-the-weights)
|
||||||
|
|
||||||
Then, run
|
## 1. Installation
|
||||||
|
|
||||||
```shell
|
1. Install the project dependencies
|
||||||
|
|
||||||
|
```bash
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Run the project
|
||||||
|
|
||||||
|
```bash
|
||||||
python run.py
|
python run.py
|
||||||
```
|
```
|
||||||
|
|
||||||
to test the code.
|
|
||||||
|
|
||||||
The script loads the checkpoint and samples from the model on a test input.
|
The script loads the checkpoint and samples from the model on a test input.
|
||||||
|
|
||||||
Due to the large size of the model (314B parameters), a machine with enough GPU memory is required to test the model with the example code.
|
Due to the large size of the model (314 Billion parameters), a machine with enough GPU memory is required to test the model with the example code.
|
||||||
|
|
||||||
The implementation of the MoE layer in this repository is not efficient. The implementation was chosen to avoid the need for custom kernels to validate the correctness of the model.
|
The implementation of the MoE layer in this repository is not efficient. The implementation was chosen to avoid the need for custom kernels to validate the correctness of the model.
|
||||||
|
|
||||||
# Model Specifications
|
## 2. Model Specifications
|
||||||
|
|
||||||
Grok-1 is currently designed with the following specifications:
|
Grok-1 is currently designed with the following specifications:
|
||||||
|
|
||||||
@ -33,8 +39,9 @@ Grok-1 is currently designed with the following specifications:
|
|||||||
- Rotary embeddings (RoPE)
|
- Rotary embeddings (RoPE)
|
||||||
- Supports activation sharding and 8-bit quantization
|
- Supports activation sharding and 8-bit quantization
|
||||||
- **Maximum Sequence Length (context):** 8,192 tokens
|
- **Maximum Sequence Length (context):** 8,192 tokens
|
||||||
|
- **TPU/GPU:** NVIDIA/AMD supported only
|
||||||
|
|
||||||
# Downloading the weights
|
## 3. Downloading the weights
|
||||||
|
|
||||||
You can download the weights using a torrent client and this magnet link:
|
You can download the weights using a torrent client and this magnet link:
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
dm_haiku==0.0.12
|
dm-haiku==0.0.12
|
||||||
jax[cuda12_pip]==0.4.25 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
|
jax[cuda12-pip]==0.4.25 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
|
||||||
numpy==1.26.4
|
numpy==1.26.4
|
||||||
sentencepiece==0.2.0
|
sentencepiece==0.2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user