Seeed-Jetson-DevelopTool / finetune-llm-llama-factory
AGENTS.md57 starsChanged 4 months agoMITView on GitHub
Fine-tune LLMs on Jetson using Llama-Factory via jetson-examples one-line deployment. Covers installation, WebUI-based training with alpaca_zh dataset on Phi-1.5, and testing the fine-tuned model. Requires Jetson with ≥16GB RAM.
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository297 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-nvrAGENTS.md
- allxon-ota-updateAGENTS.md
- allxon-setupAGENTS.md
- alwaysai-setupAGENTS.md
- backup-restoreAGENTS.md
- bsp-source-buildAGENTS.md
- clawdbot-developmentAGENTS.md
- cochl-sense-setupAGENTS.md
- cvedia-setupAGENTS.md
- dashcamnet-xavier-nx-multicameraAGENTS.md
- deciai-setupAGENTS.md
- deepseek-quick-deployAGENTS.md
- deploy-deepseek-mlcAGENTS.md
- deploy-depth-anything-v3AGENTS.md
- deploy-diaAGENTS.md
- deploy-efficient-vision-engineAGENTS.md
- deploy-frigateAGENTS.md
- deploy-live-vlm-webuiAGENTS.md
- deploy-nvbloxAGENTS.md
- deploy-ollama-anythingllmAGENTS.md
- deploy-riva-llama2AGENTS.md
- developtool-deviceAGENTS.md
- disk-encryptionAGENTS.md
- diy-bsp-buildAGENTS.md
- ethercat-communicationAGENTS.md
- ethercat-setupAGENTS.md
- fix-browser-snap-jetsonAGENTS.md
- gapi-setupAGENTS.md
- generative-ai-introAGENTS.md
- gpt-oss-liveAGENTS.md
- gr00t-n1-5-deploy-thorAGENTS.md
- gr00t-n1-6-deploy-agxAGENTS.md
- hardhat-setupAGENTS.md
- hybrid-bsp-dk-to-recomputerAGENTS.md
- imx477-a603-setupAGENTS.md
- j501-viola-fruit-sortingAGENTS.md
- jetpack5-ssd-boot-fixAGENTS.md
- jetpack-flash-wsl2AGENTS.md
- jetpack-jetson-overviewAGENTS.md
- jetpack-ota-updateAGENTS.md
- jetson-ai-toolsAGENTS.md
- jetson-docker-setupAGENTS.md
- jetson-faqAGENTS.md
- jetson-pc-wired-shareAGENTS.md
- jetson-project-galleryAGENTS.md
- jetson-resource-indexAGENTS.md
- jetson-tutorial-exercisesAGENTS.md
- ko-module-buildAGENTS.md
- l4t-differencesAGENTS.md
- langchain-output-formattingAGENTS.md
- lerobot-env-setupAGENTS.md
- llama-cpp-rpc-distributedAGENTS.md
- llm-interface-controlAGENTS.md
- local-chatbot-multimodalAGENTS.md
- local-chatbot-physicalAGENTS.md
- local-llm-text-to-imageAGENTS.md
- local-rag-llamaindexAGENTS.md
- lumeo-setupAGENTS.md
- maskcam-nanoAGENTS.md
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run one phase at a time. After each phase:
- Very specific: line 14
If output contains [STOP] → stop immediately, consult the failure decision tree below.
- Very specific: line 15
If output ends with [OK] → tell the user "Phase N complete" and proceed to the next phase.
- Distinctive: line 68
Keep other training parameters as default
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fine-tune LLM with Llama-Factory 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
| Requirement | Details |
| Hardware | Jetson device with ≥16GB RAM (tested on Orin NX 16GB and AGX Orin 64GB) |
| Peripherals | Monitor, mouse, keyboard, network (optional but recommended) |
| JetPack | 5.x or 6.x |
| Internet | Required for initial container pull |
Phase 1 — Install jetson-examples (~2 min)
pip3 install jetson-examples
sudo reboot[OK] after reboot completes and you can log back in.
Phase 2 — Deploy Llama-Factory (~5–15 min)
Launch Llama-Factory using the one-line deployment:
reComputer run llama-factoryThis pulls the container and starts the Llama-Factory service.
Once running, open a web browser and navigate to:
http://127.0.0.1:7860(Or replace 127.0.0.1 with the Jetson's IP for remote access.)
[OK] when the Llama-Factory WebUI loads in the browser. [STOP] if the container fails to start.
Phase 3 — Start training (~18 hours for default config)
In the WebUI:
- Set Model name to
Phi-1.5(or your chosen model) - Set Dataset to
alpaca_zh(or your chosen dataset) - Keep other training parameters as default
- Click the
Startbutton
Monitor training progress in the WebUI.
[OK] when training completes and the fine-tuned model appears in the save directory.
Phase 4 — Test the fine-tuned model (~2 min)
In the Llama-Factory WebUI:
- Navigate to the Chat tab
- Load the fine-tuned model by selecting the checkpoint path
- Enter a prompt in the Input text box (e.g. a Chinese language prompt if using alpaca_zh)
- Click Submit and check the output in the Chatbot text box
[OK] when the model responds with coherent output reflecting the fine-tuning data.
Failure decision tree
| Symptom | Action |
pip3 install jetson-examples fails | Check Python3 and pip3 are installed. Try sudo apt install python3-pip first. |
reComputer run llama-factory fails | Check internet connectivity. Ensure Docker is installed and running. Check available disk space. |
| WebUI not accessible at port 7860 | Verify the container is running with docker ps. Check firewall rules. Try http://<jetson-ip>:7860. |
| OOM during training | Model too large for available RAM. Use a smaller model or reduce batch size in training parameters. |
| Training stalls or crashes | Check GPU temperature with jtop. Ensure adequate cooling. Reduce training parameters. |
| Fine-tuned model produces poor results | Use more diverse fine-tuning data. Increase training epochs. Check dataset quality. |
Reference files
references/source.body.md— full original Seeed tutorial with screenshots, video demo, and detailed WebUI configuration (reference only)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

