# Export your model

Everything Facet builds for you is yours. Export a Task to keep a copy, run it on your own hardware, or move it elsewhere. Exporting is free.

## Export

- **In the web app:** open the Task's **Settings**, and under **Export and archive** choose **Download**. You get a zip of the Task's live version.
- **From your agent:** `export_task` returns the same Instructions, Expectations and examples as data. The trained files come only in the zip.

## What's inside

| File | What it is |
|---|---|
| `README.md` | The base model and the exact revision (a fixed snapshot of it) this version was built on |
| `adapter/` | The part Facet trained for your Task: a LoRA adapter, the standard small add-on to a base model, in the PEFT format most tools read. Absent if the version only changed Instructions |
| `instructions.json` | The system prompt, example answers and output format Facet sends with every call |
| `expectations.md` | Each Expectation, how it's checked and its bar |
| `examples/` | The examples each version learned from, one JSON object per line; file N matches Expectation N |

Hidden examples are not included: they stay in Facet, so its checks stay honest.

## Run it yourself

The adapter loads on its base model with any tool that reads PEFT adapters. With vLLM, an open source server, on a machine with a GPU:

```sh
vllm serve <base model from README.md> --revision <revision from README.md> \
  --enable-lora --lora-modules support-triage=./adapter
```

Then call it as `support-triage` with any OpenAI SDK, and send the system prompt from `instructions.json` as the first message: Facet adds it to every call for you, but a server you run won't.

With Hugging Face Transformers:

```python
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

name, rev = "<base model from README.md>", "<revision from README.md>"
base = AutoModelForCausalLM.from_pretrained(name, revision=rev)
model = PeftModel.from_pretrained(base, "adapter")
tokenizer = AutoTokenizer.from_pretrained(name, revision=rev)

system = "<the system prompt from instructions.json>"
messages = [{"role": "system", "content": system}, {"role": "user", "content": "I was charged twice"}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
print(tokenizer.decode(model.generate(inputs, max_new_tokens=200)[0][inputs.shape[1]:], skip_special_tokens=True))
```

Use the base model and revision named in `README.md`; an adapter only works on the base it was built on.

## Next steps

- [Base models](/docs/base-models): what each base is and its license
- [Privacy and data](/docs/privacy): what Facet keeps and what deleting a Task removes
