Quantized Llama2 7b Mlc logo

Quantized Llama2 7b Mlc

Organization
Seeed-Projects
quantized-llama2-7b-mlc

Deploy quantized Llama2-7B with MLC LLM on Jetson Orin NX for fast edge inference. Uses jetson-containers Docker workflow with 4-bit quantization (q4f16_ft). Requires Jetson Orin with ≥16GB RAM, JetPack 5.x, and HuggingFace access token.

Overview

PublisherSeeed-Projects
RepositorySeeed-Jetson-DevelopTool
Skill namequantized-llama2-7b-mlc
Stars
58
Forks
9
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Seeed-Projects on GitHub. Read the source before you install it.

Installation

Install the Quantized Llama2 7b Mlc AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Seeed-Projects/Seeed-Jetson-DevelopTool/tree/main/seeed_jetson_develop/skills/openclaw/quantized-llama2-7b-mlc
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Seeed-Projects/Seeed-Jetson-DevelopTool.git /tmp/Seeed-Jetson-DevelopTool
mkdir -p .claude/skills
cp -r /tmp/Seeed-Jetson-DevelopTool/seeed_jetson_develop/skills/openclaw/quantized-llama2-7b-mlc .claude/skills/quantized-llama2-7b-mlc
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Quantized Llama2 7b Mlc in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Quantized Llama2 7b Mlc on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Quantized Llama2 7b Mlc is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Quantized Llama2-7B with MLC LLM on Jetson


Execution model

Run one phase at a time. After each phase:

  • Relay all command output to the user.
  • If output contains [STOP] → stop immediately, consult the failure decision tree below.
  • If output ends with [OK] → tell the user "Phase N complete" and proceed to the next phase.

Prerequisites

RequirementMinimum
HardwarereComputer J4012 (Jetson Orin NX 16GB) or equivalent
RAM≥ 16 GB
JetPack5.x (R35.x)
StorageSSD recommended — model weights + Docker images are large
InternetRequired for Docker pull and model download
HuggingFaceAccess token with Llama2 model access granted

Phase 1 — Preflight

bash
cat /etc/nv_tegra_release
free -h
df -h /

Expected: R35.x (JP5), ≥16 GB RAM, ≥50 GB disk free. [OK] when all pass. [STOP] if insufficient RAM or disk.


Phase 2 — Install dependencies and clone jetson-containers

bash
sudo apt-get update
sudo apt-get install -y git python3-pip
git clone --depth=1 https://github.com/dusty-nv/jetson-containers
cd jetson-containers
pip3 install -r requirements.txt

Clone the MLC-LLM helper scripts:

bash
cd ./data
git clone https://github.com/LJ-Hao/MLC-LLM-on-Jetson-Nano.git
cd ..

[OK] when both repos are cloned and requirements installed. [STOP] if git clone fails.


Phase 3 — Pull MLC Docker image and download Llama2 model

Replace <YOUR-ACCESS-TOKEN> with your HuggingFace token:

bash
./run.sh --env HUGGINGFACE_TOKEN=<YOUR-ACCESS-TOKEN> $(./autotag mlc) \
  /bin/bash -c 'ln -s $(huggingface-downloader meta-llama/Llama-2-7b-chat-hf) /data/models/mlc/dist/models/Llama-2-7b-chat-hf'

Verify the Docker image was created:

bash
sudo docker images | grep mlc

[OK] when MLC image is listed and model download completed. [STOP] if image not found or download failed.


Phase 4 — Quantize the model with MLC

bash
./run.sh $(./autotag mlc) \
  python3 -m mlc_llm.build \
  --model Llama-2-7b-chat-hf \
  --quantization q4f16_ft \
  --artifact-path /data/models/mlc/dist \
  --max-seq-len 4096 \
  --target cuda \
  --use-cuda-graph \
  --use-flash-attn-mqa

[OK] when quantization completes without errors. [STOP] if OOM or build errors.


Phase 5 — Run inference

Enter the Docker container (use the image name from Phase 3):

bash
./run.sh <YOUR_MLC_IMAGE_NAME>
# e.g.: ./run.sh dustynv/mlc:51fb0f4-builder-r35.4.1

Inside the container, run the quantized model:

bash
cd /data/MLC-LLM-on-Jetson
python3 Llama-2-7b-chat-hf-q4f16_ft.py

For comparison, you can also try the non-quantized version (will likely OOM on 16GB):

bash
python3 Llama-2-7b-chat-hf.py

[OK] when the quantized model generates text responses successfully.


Failure decision tree

SymptomAction
git clone failsCheck internet connectivity. Verify git is installed.
HuggingFace download failsVerify token is valid and has Llama2 access. Visit https://huggingface.co/meta-llama/Llama-2-7b-chat-hf to request access.
Docker image not found after ./run.shRun sudo docker images to check. Re-run the Phase 3 command.
OOM during quantizationClose other processes. Ensure ≥16 GB RAM. Try reducing --max-seq-len.
Non-quantized model fails to runExpected on 16 GB — the full model requires more memory. Use the quantized version.
./autotag mlc returns wrong tagVerify JetPack version matches. The autotag script selects based on L4T version.
Slow inferenceEnsure --use-cuda-graph and --use-flash-attn-mqa flags were used during quantization.

Reference files

  • references/source.body.md — full original Seeed tutorial with Docker screenshots, comparison between quantized and non-quantized inference, and video demonstration (reference only)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Quantized Llama2 7b Mlc AI skill do?

Deploy quantized Llama2-7B with MLC LLM on Jetson Orin NX for fast edge inference. Uses jetson-containers Docker workflow with 4-bit quantization (q4f16_ft). Requires Jetson Orin with ≥16GB RAM, JetPack 5.x, and HuggingFace access token.

Why use Quantized Llama2 7b Mlc on TypingMind?

Because you install it once and use it with any model. Quantized Llama2 7b Mlc is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Quantized Llama2 7b Mlc in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Seeed-Projects/Seeed-Jetson-DevelopTool/tree/main/seeed_jetson_develop/skills/openclaw/quantized-llama2-7b-mlc. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Quantized Llama2 7b Mlc?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Quantized Llama2 7b Mlc?

As many as you like. As long as a model supports skills, you can use Quantized Llama2 7b Mlc with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Quantized Llama2 7b Mlc AI skill free?

Yes. It is published on GitHub by Seeed-Projects under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇