Update README.md
#42
by
up2u
- opened
README.md
CHANGED
|
@@ -1,39 +1,46 @@
|
|
| 1 |
-
# Grok 2
|
| 2 |
-
|
| 3 |
-
This repository contains the weights of Grok 2, a model trained and used at xAI in 2024.
|
| 4 |
-
|
| 5 |
-
## Usage: Serving with SGLang
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
-
|
| 10 |
-
hf download xai-org/grok-2 --local-dir /local/grok-2
|
| 11 |
-
```
|
| 12 |
-
|
| 13 |
-
You might encounter some errors during the download. Please retry until the download is successful.
|
| 14 |
-
If the download succeeds, the folder should contain **42 files** and be approximately 500 GB.
|
| 15 |
-
|
| 16 |
-
- Launch a server.
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
python3 -m sglang.launch_server --model /local/grok-2 --tokenizer-path /local/grok-2/tokenizer.tok.json --tp 8 --quantization fp8 --attention-backend triton
|
| 23 |
-
```
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
```
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
|
|
|
| 36 |
|
| 37 |
-
## License
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
+
---
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
license: other
|
| 6 |
+
library_name: sglang
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- grok-2
|
| 10 |
+
- xai
|
| 11 |
+
- sglang
|
| 12 |
+
- inference
|
| 13 |
+
- triton
|
| 14 |
+
base_model: xai-org/grok-2
|
| 15 |
+
model-index:
|
| 16 |
+
- name: grok-2
|
| 17 |
+
results: []
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
|
| 21 |
+
# Grok 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
This repository contains the weights of Grok 2, a model trained and used at xAI in 2024.
|
| 24 |
|
| 25 |
+
- License: Grok 2 Community License Agreement (./LICENSE)
|
| 26 |
+
- Ownership: xAI (this document does not change license or weights)
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
## Weights
|
| 29 |
|
| 30 |
+
Download from the Hub (≈500 GB total; 42 files):
|
| 31 |
|
| 32 |
+
```bash
|
| 33 |
+
hf download xai-org/grok-2 --local-dir /local/grok-2
|
|
|
|
| 34 |
|
| 35 |
+
python3 -m sglang.launch_server \
|
| 36 |
+
--model /local/grok-2 \
|
| 37 |
+
--tokenizer-path /local/grok-2/tokenizer.tok.json \
|
| 38 |
+
--tp 8 \
|
| 39 |
+
--quantization fp8 \
|
| 40 |
+
--attention-backend triton
|
| 41 |
|
| 42 |
+
python3 -m sglang.test.send_one --prompt \
|
| 43 |
+
"Human: What is your name?<|separator|>\n\nAssistant:"
|
| 44 |
|
|
|
|
| 45 |
|
| 46 |
+
https://github.com/sgl-project/sglang/blob/97a38ee85ba62e268bde6388f1bf8edfe2ca9d76/python/sglang/srt/tokenizer/tiktoken_tokenizer.py#L106
|