> For the complete documentation index, see [llms.txt](https://docs.catalyx.solutions/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.catalyx.solutions/catalyx-daml-coding-assistant/self-hosting.md).

# Self-Hosting

The model behind the Daml Coding Assistant is published open-weight, so you can run the entire completion stack on your own infrastructure — your code never leaves your premises.

{% hint style="info" %}
The complete, authoritative self-hosting guide lives alongside the model weights: [SELF\_HOSTING.md on Hugging Face](https://huggingface.co/intellecteu/daml-fim-7b/blob/main/SELF_HOSTING.md). This page summarises what is involved.
{% endhint %}

## What is released

* **Model weights** — [intellecteu/daml-fim-7b](https://huggingface.co/intellecteu/daml-fim-7b) on Hugging Face: a 7B-parameter fill-in-the-middle model fine-tuned on Daml code.
* **Documentation** — hardware requirements, serving instructions, and the full inference contract (context trimming, prompt construction, output cleaning), so you can build the glue between your editor and the model in the language and runtime of your choice.

## What you need

| Resource | Requirement                                                                                                            |
| -------- | ---------------------------------------------------------------------------------------------------------------------- |
| GPU      | 1× NVIDIA L4 (24 GB), CUDA 12.x — the validated configuration; other ≥ 24 GB NVIDIA cards should work but are untested |
| Disk     | \~20 GB for the model weights                                                                                          |
| Serving  | [vLLM](https://docs.vllm.ai), which exposes a standard OpenAI-compatible API — stock software, no custom build         |

## How it fits together

```
editor / client ──▶ your glue ──▶ vLLM (OpenAI-compatible API) ──▶ model weights
```

1. Download the weights from Hugging Face.
2. Serve them with vLLM.
3. Build a small glue service that trims the code context, wraps it in the model's fill-in-the-middle prompt format, calls vLLM, and cleans the output — fully specified in the guide.

If you implement the glue to the `/fim` contract described in the guide, the published VS Code extension works against your server unmodified: set `daml-coding-assistant.serverUrl` to your own endpoint, and clear `daml-coding-assistant.oidcDiscoveryUrl` (or point it at your own identity provider) so the extension does not try to log in against the hosted service (see [Usage & Settings](/catalyx-daml-coding-assistant/usage-and-settings.md#settings) and the authentication section of the full guide).

## License

The weights are released under the [Business Source License 1.1](https://huggingface.co/intellecteu/daml-fim-7b/blob/main/LICENSE): you may download, self-host, and make production use of the model free of charge, including commercially — but you may not offer it to third parties as a hosted or managed service whose primary value is the code autocompletion, generation, or analysis the model provides. The license converts to Apache-2.0 on 2030-07-22. Output you generate with the model is yours. For alternative licensing arrangements, contact <legal@intellecteu.com>.

<a href="https://huggingface.co/intellecteu/daml-fim-7b/blob/main/SELF_HOSTING.md" class="button primary">Open the full self-hosting guide</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.catalyx.solutions/catalyx-daml-coding-assistant/self-hosting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
