中文版正在随流水线自动整理,稍后刷新即可;可先阅读下方英文原文。
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
AI图鉴首页 › AI 资讯 › 你的型号在AWS训练场上运行吗?抬头看
本条资讯的摘要暂未整理出来,可点击下方按钮查看原文;本站每小时自动补充中文摘要。
中文版正在随流水线自动整理,稍后刷新即可;可先阅读下方英文原文。
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
Does Your Model Run on AWS Trainium? Look It Up
In a previous post, we introduced TorchNeuron, the native PyTorch backend for AWS Trainium (the torch-neuronx package). With it, Transformers runs its own modeling code on Trainium, as it does on any other device, so any Transformers model on the Hub may run. Which ones actually do?
The torch-neuronx model support Space answers that question for the most popular models on the Hub. It tells you whether a model runs unmodified on Trainium, and gives you the script to run it yourself.
Look up a model
The Space opens on the Selected view: our own selection of models picked among the top models on the Hub by downloads and by trending score. Each row gives the result, the number of Trainium cores the model is sharded over, the wall time of the run (compilation included) and the peak device memory.
To look up a given model, switch to the Trending or Downloads view and type part of its name. These views follow the Hub's own rankings, one task at a time, whether a model was tested or not. When a model was left out on purpose, the Space tells you why (most of the time it was not prioritized, sometimes it is truly incompatible). You can also pick the versions of the Neuron compiler (neuronx-cc) and of Transformers to look at.
At the time of writing, only Transformers models are tested, and our selection is limited to text-generation and image-text-to-text models. We plan to expand to diffusers, sentence transformers, and other transformers tasks.
Run it yourself
Select a model to see how to run it. The Space lists the Neuron stack the model was tested on, the packages to install on top of it, and the run.py script that ran. The script follows the recipe of the TorchNeuron announcement: it loads the model with from_pretrained, sharded when it needs to be, then generates with a static cache and torch.compile(backend="neuron").
On a Trainium2 (trn2) instance with that stack, for example in the AWS Neuron Deep Learning Container, install the packages, then run:
python3 run.py
No need for torchrun: the script launches its own torch.distributed ranks when the model is sharded.
A first run starts by compiling the model's graphs. To skip that step, copy the graphs the same compiler built during the test, from the public NEFF cache bucket. The Space gives you the command, with the right compiler version:
hf buckets sync hf://buckets/aws-neuron/torch-neuronx-neff-cache/neuronxcc-<version> /tmp/neff_cache
What "runs" means
Each test loads the model on a trn2 instance, sharded over the smallest number of Trainium cores that can hold its weights. Most models are sharded with tensor parallelism. Mixture-of-experts models without a tensor-parallel plan use expert parallelism only. The test then generates 32 tokens and checks them. On a single core, the tokens are compared with those of a CPU run of the same checkpoint. When the model is sharded, a small judge model checks that the text is fluent English.
At the time of writing, only models that fit on 4 Trainium2 devices are tested, which means 16 cores at most. A PASS says nothing about throughput, or about longer generations.
The results are a dataset
Everything the Space shows comes from the public aws-neuron/torch-neuronx-model-support dataset, with one Parquet file per pair of neuronx-cc and library versions.
Each row holds a model's result, the error when it failed, the versions of the whole stack and the run.py that ran. You can query it directly:
import pandas as pd
df = pd.read_parquet("hf://datasets/aws-neuron/torch-neuronx-model-support/data")
df[df.model_id == "Qwen/Qwen3-0.6B"][["neuronx_cc", "library", "library_version", "neuron_cores", "result"]]
The dataset card gives the exact meaning of each result.
Next time you wonder whether a model runs on Trainium, look it up.
Auto-fetched and translated by AI Atlas. All rights belong to the original author.
AI Text Cleaner 可在浏览器中清除草稿中的隐藏 Unicode 字符、零宽空格和残留 Mark
AITraining.jobsAITraining.jobs 汇总 AI 训练、评测和数据标注等岗位,按平台、角色和地区整理招聘信息与薪酬
Cursive Font GeneratorCursive Font Generator 提供免费草书文字与字体设计工具,并提供 AI 手写生成和签名优
DuaerDuaer 面向团队提供 AI 驱动的表格合并、固定格式报表和月度损益表整理,支持按需或定时运行,结果仍需人
新用户最高 $200 免费额度(6 个月)
AWS Activate创业公司最高 $200k 云额度
Amazon Bedrock新用户 $200 AWS 额度
Cloudflare Workers AI每日 1 万神经元免费额度,50+ 开源模型
HuggingFace · 10-23
OlmoEarth v1.3:最先进嵌入整个行星HuggingFace · 10-23
标题、摘要与正文均来自该信源的公开页面,版权归原作者所有;本站自动聚合与翻译,仅作出处跳转。