Grok - X AI 314B大模型


关于 Grok

Grok-1 is a 314 billion parameter Mixture-of-Experts model trained from scratch by xAI.


相关文章


运行

https://github.com/xai-org/grok-1 这个存储库包含用于加载和运行 Grok-1 开放权重模型的 JAX示例代码。

下载 checkpoint,然后替换 checkpoints 中的 ckpt-0 文件夹,看 Downloading the weights


然后,运行下面代码来测试:

pip install -r requirements.txt
python run.py

脚本在测试输入上从模型加载 checkpoint 和样本。

由于模型的大尺寸(314B参数),需要具有足够GPU内存的机器来用示例代码测试模型。
该存储库中MoE层的实现效率不高。
选择该实现是为了避免 需要自定义内核 来验证模型的正确性。


Model Specifications

Grok-1 is currently designed with the following specifications:

  • Parameters: 314B
  • Architecture: Mixture of 8 Experts (MoE)
  • Experts Utilization: 2 experts used per token
  • Layers: 64
  • Attention Heads: 48 for queries, 8 for keys/values
  • Embedding Size: 6,144
  • Tokenization: SentencePiece tokenizer with 131,072 tokens
  • Additional Features:
    • Rotary embeddings (RoPE)
    • Supports activation sharding and 8-bit quantization
  • Maximum Sequence Length (context): 8,192 tokens

下载权重

方式一:使用磁力链下载

You can download the weights using a torrent client and this magnet link:

magnet:?xt=urn:btih:5f96d43576e3d386c9ba65b883210a393b68210e&tr=https%3A%2F%2Facademictorrents.com%2Fannounce.php&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce

方式二:直接使用 🤗 HuggingFace Hub

https://huggingface.co/xai-org/grok-1

git clone https://github.com/xai-org/grok-1.git && cd grok-1

pip install huggingface_hub[hf_transfer]

huggingface-cli download xai-org/grok-1 --repo-type model --include ckpt-0/* --local-dir checkpoints --local-dir-use-symlinks False

2024-03-29(五)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

富婆E

请我喝杯伯爵奶茶~!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值