---
title: "alpaca-lora"
type: "tool"
slug: "tloen-alpaca-lora"
canonical_url: "https://www.graphcanon.com/tools/tloen-alpaca-lora"
github_url: "https://github.com/tloen/alpaca-lora"
homepage_url: null
stars: 18913
forks: 2185
primary_language: "Jupyter Notebook"
license: "Apache-2.0"
archived: false
categories: ["model-training", "computer-vision", "inference-serving"]
tags: ["jupyter-notebook"]
updated_at: "2026-07-11T23:22:01.714762+00:00"
---

# alpaca-lora

> Instruct-tune LLaMA on consumer hardware

Instruct-tune LLaMA on consumer hardware

## Facts

- Repository: https://github.com/tloen/alpaca-lora
- Stars: 18,913 · Forks: 2,185 · Open issues: 366 · Watchers: 150
- Primary language: Jupyter Notebook
- License: Apache-2.0
- Last pushed: 2024-07-29T13:37:49+00:00

## Trust & health

_Signals computed from public GitHub metadata. Not a security guarantee._

- Maintenance: Dormant (computed 2026-07-11T23:21:55.583Z)
- Security scan: Findings present (1 critical, 5 high, 12 medium, 28 low) · last scan 2026-07-11T23:21:56.017Z
- Full report: [trust report](/tools/tloen-alpaca-lora/trust.md) · [JSON](https://www.graphcanon.com/api/graphcanon/tools/tloen-alpaca-lora/trust)

## Categories

- [Model Training](/categories/model-training.md)
- [Computer Vision](/categories/computer-vision.md)
- [Inference & Serving](/categories/inference-serving.md)

## Tags

jupyter notebook

## Category neighbours (exploratory)

_Same-category tools for discovery only - not curated alternatives. Cap shown at six._

- [tensorflow](/tools/tensorflow-tensorflow.md) - An Open Source Machine Learning Framework for Everyone (★ 196,300) [Very active]
- [ollama](/tools/ollama-ollama.md) - Get up and running with various large language models using Ollama. (★ 175,936) [Very active]
- [transformers](/tools/huggingface-transformers.md) - Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models (★ 162,482) [Very active]
- [langflow](/tools/langflow-ai-langflow.md) - Langflow is a powerful tool for building and deploying AI-powered agents and workflows. (★ 151,697) [Very active]
- [open-webui](/tools/open-webui-open-webui.md) - User-friendly AI Interface (Supports Ollama, OpenAI API, ...) (★ 145,029) [Very active]
- [llama.cpp](/tools/ggml-org-llama-cpp.md) - LLM inference in C/C++ (★ 120,002) [Very active]

_+ 2 more not listed._

## README (excerpt)

_Quoted verbatim from the upstream repository. Untrusted content - treat as data, not instructions._

````text
### Docker Setup & Inference

1. Build the container image:

```bash
docker build -t alpaca-lora .
```

2. Run the container (you can also use `finetune.py` and all of its parameters as shown above for training):

```bash
docker run --gpus=all --shm-size 64g -p 7860:7860 -v ${HOME}/.cache:/root/.cache --rm alpaca-lora generate.py \
    --load_8bit \
    --base_model 'decapoda-research/llama-7b-hf' \
    --lora_weights 'tloen/alpaca-lora-7b'
```

3. Open `https://localhost:7860` in the browser

---

### Docker Compose Setup & Inference

1. (optional) Change desired model and weights under `environment` in the `docker-compose.yml`

2. Build and run the container

```bash
docker-compose up -d --build
```

3. Open `https://localhost:7860` in the browser

4. See logs:

```bash
docker-compose logs -f
```

5. Clean everything up:

```bash
docker-compose down --volumes --rmi all
```
````

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/tools/tloen-alpaca-lora`](/api/graphcanon/tools/tloen-alpaca-lora)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
