
容器镜像运行构建
HuggingFace Transformers库通过便捷的API支持各种NLP和视觉模型,被许多其他LLM包所使用。在HuggingFace Hub上有大量与其兼容的模型。
[!NOTE]
如果您希望使用Transformer的集成bitsandbytes量化(load_in_8bit/load_in_4bit)或AutoGPTQ量化,请运行以下容器,这些容器在Transformers基础上包含了相应的库:
- https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/auto_gptq%EF%BC%88%E4%BE%9D%E8%B5%96%E4%BA%8ETransformers%EF%BC%89
- https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/bitsandbytes%EF%BC%88%E4%BE%9D%E8%B5%96%E4%BA%8ETransformers%EF%BC%89
替换您想要运行的文本生成模型(应该是像GPT、Llama等CausalLM模型)
bash./run.sh $(./autotag transformers) \ huggingface-benchmark.py --model=gpt2
如果模型仓库是私有的或需要身份验证,请添加
--env HUGGINGFACE_TOKEN=<您的访问令牌>
默认情况下,性能测量会生成128个新的输出标记(可以使用--tokens=N设置)
可以使用--prompt='your prompt here'更改提示
精度/量化
使用--precision参数启用量化(选项:fp32 fp16 fp4 int8,默认:fp16)
如果您使用fp4或int8,请运行上面提到的https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/bitsandbytes%E5%AE%B9%E5%99%A8%EF%BC%8C%E4%BB%A5%E4%BE%BF%E5%AE%89%E8%A3%85bitsandbytes%E5%8C%85%E8%BF%9B%E8%A1%8C%E9%87%8F%E5%8C%96%E3%80%82%E9%A2%84%E6%9C%9F%E9%80%9A%E8%BF%87Transformers%E7%9A%844%E4%BD%8D/8%E4%BD%8D%E9%87%8F%E5%8C%96%E6%AF%94FP16%E6%85%A2%EF%BC%88%E4%BD%86%E6%B6%88%E8%80%97%E6%9B%B4%E5%B0%91%E5%86%85%E5%AD%98%EF%BC%89- 更多信息请参见此处。
其他库如https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/exllama%E3%80%81https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/awq%E5%92%8Chttps://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/auto-gptq%E6%9C%89%E8%87%AA%E5%AE%9A%E4%B9%89CUDA%E5%86%85%E6%A0%B8%E5%92%8C%E6%9B%B4%E9%AB%98%E6%95%88%E7%9A%84%E9%87%8F%E5%8C%96%E6%80%A7%E8%83%BD%E3%80%82
Llama2
bash./run.sh --env HUGGINGFACE_TOKEN=<您的访问令牌> $(./autotag transformers) \ huggingface-benchmark.py --model=meta-llama/Llama-2-7b-hf
transformers | |
|---|---|
| 构建状态 | |
| 要求 | L4T ['>=32.6'] |
| 依赖项 | https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/build-essential https://github.com/dusty-nv/jetson-containers/tree/master/packages/cuda/cuda https://github.com/dusty-nv/jetson-containers/tree/master/packages/cuda/cudnn https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/python https://github.com/dusty-nv/jetson-containers/tree/master/packages/numpy https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/cmake/cmake_pip https://github.com/dusty-nv/jetson-containers/tree/master/packages/onnx https://github.com/dusty-nv/jetson-containers/tree/master/packages/pytorch https://github.com/dusty-nv/jetson-containers/tree/master/packages/pytorch/torchvision https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/huggingface_hub https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/rust |
| 被依赖项 | https://github.com/dusty-nv/jetson-containers/tree/master/packages/audio/audiocraft https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/auto_awq https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/auto_gptq https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/awq https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/bitsandbytes https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/bitsandbytes https://github.com/dusty-nv/jetson-containers/tree/master/packages/vit/efficientvit https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/gptq-for-llama https://github.com/dusty-nv/jetson-containers/tree/master/packages/l4t/l4t-diffusion https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/llava https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/mlc https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/mlc https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/mlc https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/mlc https://github.com/dusty-nv/jetson-containers/tree/master/packages/vectordb/nanodb https://github.com/dusty-nv/jetson-containers/tree/master/packages/vit/nanoowl https://github.com/dusty-nv/jetson-containers/tree/master/packages/vit/nanosam https://github.com/dusty-nv/jetson-containers/tree/master/packages/nemo https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/optimum https://github.com/dusty-nv/jetson-containers/tree/master/packages/diffusion/stable-diffusion https://github.com/dusty-nv/jetson-containers/tree/master/packages/diffusion/stable-diffusion-webui https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/tensorrt_llm https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/tensorrt_llm https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/tensorrt_llm https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/tensorrt_llm https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/text-generation-inference https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/text-generation-webui https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/text-generation-webui https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/text-generation-webui https://github.com/dusty-nv/jetson-containers/tree/master/packages/audio/voicecraft https://github.com/dusty-nv/jetson-containers/tree/master/packages/audio/whisperx https://github.com/dusty-nv/jetson-containers/tree/master/packages/audio/xtts |
| Dockerfile | https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/transformers/Dockerfile |
| 镜像 | https://hub.docker.com/r/dustynv/transformers/tags (2023-12-15, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-12, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-11, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-05, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-15, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-14, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-15, 1.5GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-11, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-12, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-15, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-15, 7.6GB) |
| 说明 | 在JetPack5上添加了bitsandbytes和auto_gptq依赖项,用于4位/8位量化 |
transformers:git | |
|---|---|
| 构建状态 | |
| 要求 | L4T ['>=32.6'] |
| 依赖项 | https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/build-essential https://github.com/dusty-nv/jetson-containers/tree/master/packages/cuda/cuda https://github.com/dusty-nv/jetson-containers/tree/master/packages/cuda/cudnn https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/python https://github.com/dusty-nv/jetson-containers/tree/master/packages/numpy https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/cmake/cmake_pip https://github.com/dusty-nv/jetson-containers/tree/master/packages/onnx https://github.com/dusty-nv/jetson-containers/tree/master/packages/pytorch https://github.com/dusty-nv/jetson-containers/tree/master/packages/pytorch/torchvision https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/huggingface_hub https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/rust |
| Dockerfile | https://github.com/dusty-nv/jetson-containers/tree/master/packages/llm/transformers/Dockerfile |
| 镜像 | https://hub.docker.com/r/dustynv/transformers/tags (2023-12-15, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-12, 5.9GB)https://hub.docker.com/r/dustynv/transformers/tags (2023-12-11, 5.9GB) |
| 说明 | 在JetPack5上添加了bitsandbytes和auto_gptq依赖项,用于4位/8位量化 |
transformers:nvgpt | |
|---|---|
| 构建状态 | |
| 要求 | L4T ['>=32.6'] |
| 依赖项 | [build-essential](https://github.com/dusty-nv/jetson-containers/tree/master/packages/build/build- |
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。






探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务