# dedene/arete-27b-dgx-spark architecture

> Architecture diagram of the GitHub repository dedene/arete-27b-dgx-spark, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dedene/arete-27b-dgx-spark
- Repository: https://github.com/dedene/arete-27b-dgx-spark

## Overview

This repository packages a single-machine Arete-27B inference service. The main workflow is: Compose starts a one-shot asset download, then launches the TensorFold-backed OpenAI-compatible API; clients send chat requests and receive generated responses. The documented product also supports image input, tool calls, streaming, configurable reasoning and speculative decoding, plus functional checks and concurrent follow-up benchmarking. Runtime source is sparse in the supplied tree, so service wiring and engine behavior are represented only where the README documents them.

Main entry points: [`compose.yaml`](https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml) (OpenAI-compatible API), [`tools/download.sh`](https://github.com/dedene/arete-27b-dgx-spark/blob/main/tools/download.sh) (Pinned asset download), [`Dockerfile`](https://github.com/dedene/arete-27b-dgx-spark/blob/main/Dockerfile) (TensorFold image), [`tools/check.py`](https://github.com/dedene/arete-27b-dgx-spark/blob/main/tools/check.py) (Functional checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_deployment["Deployment"]
  node_compose["Compose services<br/>[compose.yaml]"]
  node_image["TensorFold image"]
  node_downloader["Pinned asset download<br/>[download.sh]"]
  node_weights[("Arete model weights")]
  node_drafter[("DFlash2 drafter")]
  node_tokenizer[("Nous tokenizer files")]
end

subgraph group_inference["Inference service"]
  node_engine["TensorFold engine<br/>[compose.yaml]"]
  node_api["OpenAI-compatible API<br/>[compose.yaml]"]
  node_chat["Chat generation<br/>[serve.sh]"]
  node_vision["Image input<br/>[compose.yaml]"]
  node_tools["Tool-call handling<br/>[compose.yaml]"]
  node_streaming["Streaming output<br/>[compose.yaml]"]
end

subgraph group_operations["Operational tools"]
  node_checks["Functional checks<br/>[check.py]"]
  node_benchmark["Agent benchmark<br/>[agents.py]"]
end

node_user(("API client"))

node_compose -->|"starts first"| node_downloader
node_compose -->|"starts server"| node_engine
node_image -->|"packages engine"| node_engine
node_downloader -->|"downloads"| node_weights
node_downloader -->|"downloads"| node_drafter
node_downloader -->|"fetches separately"| node_tokenizer
node_engine -->|"serves"| node_api
node_user -->|"sends requests"| node_api
node_api -->|"routes chat"| node_chat
node_api -->|"accepts images"| node_vision
node_api -->|"supports calls"| node_tools
node_api -->|"streams replies"| node_streaming
node_checks -->|"probes endpoints"| node_api
node_benchmark -->|"measures follow-ups"| node_api

click node_compose "https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml"
click node_image "https://github.com/dedene/arete-27b-dgx-spark/blob/main/Dockerfile"
click node_downloader "https://github.com/dedene/arete-27b-dgx-spark/blob/main/tools/download.sh"
click node_engine "https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml"
click node_api "https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml"
click node_chat "https://github.com/dedene/arete-27b-dgx-spark/blob/main/tools/serve.sh"
click node_vision "https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml"
click node_tools "https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml"
click node_streaming "https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml"
click node_checks "https://github.com/dedene/arete-27b-dgx-spark/blob/main/tools/check.py"
click node_benchmark "https://github.com/dedene/arete-27b-dgx-spark/blob/main/tools/agents.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_compose,node_image,node_downloader,node_weights,node_drafter,node_tokenizer,node_user toneBlue
class node_engine,node_api,node_chat,node_vision,node_tools,node_streaming toneAmber
class node_checks,node_benchmark toneMint
```

## Components

### Deployment

- [Compose services](https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml): `compose.yaml`
- [TensorFold image](https://github.com/dedene/arete-27b-dgx-spark/blob/main/Dockerfile): `Dockerfile`
- [Pinned asset download](https://github.com/dedene/arete-27b-dgx-spark/blob/main/tools/download.sh): `tools/download.sh`
- **Arete model weights**
- **DFlash2 drafter**
- **Nous tokenizer files**

### Inference service

- [TensorFold engine](https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml): `compose.yaml`
- [OpenAI-compatible API](https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml): `compose.yaml`
- [Chat generation](https://github.com/dedene/arete-27b-dgx-spark/blob/main/tools/serve.sh): `tools/serve.sh`
- [Image input](https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml): `compose.yaml`
- [Tool-call handling](https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml): `compose.yaml`
- [Streaming output](https://github.com/dedene/arete-27b-dgx-spark/blob/main/compose.yaml): `compose.yaml`

### Operational tools

- [Functional checks](https://github.com/dedene/arete-27b-dgx-spark/blob/main/tools/check.py): `tools/check.py`
- [Agent benchmark](https://github.com/dedene/arete-27b-dgx-spark/blob/main/tools/agents.py): `tools/agents.py`

### Other components

- **API client**

## Connections

- Compose services → Pinned asset download: starts first (evidence: `README.md`)
- Compose services → TensorFold engine: starts server (evidence: `README.md`)
- TensorFold image → TensorFold engine: packages engine (evidence: `README.md`)
- Pinned asset download → Arete model weights: downloads (evidence: `README.md`)
- Pinned asset download → DFlash2 drafter: downloads (evidence: `README.md`)
- Pinned asset download → Nous tokenizer files: fetches separately (evidence: `README.md`)
- TensorFold engine → OpenAI-compatible API: serves (evidence: `README.md`)
- API client → OpenAI-compatible API: sends requests (evidence: `README.md`)
- OpenAI-compatible API → Chat generation: routes chat (evidence: `README.md`)
- OpenAI-compatible API → Image input: accepts images (evidence: `README.md`)
- OpenAI-compatible API → Tool-call handling: supports calls (evidence: `README.md`)
- OpenAI-compatible API → Streaming output: streams replies (evidence: `README.md`)
- Functional checks → OpenAI-compatible API: probes endpoints (evidence: `tools/check.py`)
- Agent benchmark → OpenAI-compatible API: measures follow-ups (evidence: `tools/agents.py`)
