Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions stratallmbasev3/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
__pycache__/
*.pyc
*.tgz
7 changes: 7 additions & 0 deletions stratallmbasev3/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v2
appVersion: "0.2.23"
description: "Generic Strata + llm-init base; the model is supplied at install time via env. llm-init and the engine share runtime state through Common."
name: stratallmbasev3
icon: https://app.cdn.olares.com/appstore/strata/icon.png
type: application
version: 1.0.5
269 changes: 269 additions & 0 deletions stratallmbasev3/OlaresManifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
olaresManifest.version: '0.12.0'
olaresManifest.type: app
apiVersion: 'v3'
metadata:
name: stratallmbasev3
icon: https://app.cdn.olares.com/appstore/strata/icon.png
description: "A template for running a language model locally with Strata"
appid: stratallmbasev3
title: Strata Engine Base
version: '1.0.5'
categories:
- AI
- models
tags:
- engine
sharedEntrances:
- name: stratallmbasev3
host: sharedentrances-api
port: 0
title: Strata Engine Base
invisible: true
authLevel: internal
icon: https://app.cdn.olares.com/appstore/strata/icon.png
entrances:
- name: strataclient
port: 8090
host: download-svc
title: Strata Engine Base
icon: https://app.cdn.olares.com/appstore/strata/icon.png
openMethod: window
authLevel: internal
- name: strataui
port: 8080
# Keep the route available without blocking initialization on model loading.
skip: true
host: strata
title: Strata UI
icon: https://app.cdn.olares.com/appstore/strata/icon.png
openMethod: window
authLevel: internal
# stratallmbasev3 — engine Deployment (== appid / Release.Name)
# llminit — llm-init / entrance Deployment
workloadReplicas:
stratallmbasev3: 1
llminit: 1
spec:
onlyAdmin: true
versionName: '0.2.23'
upgradeDescription: |
Updated the Strata engine to 0.2.23.

[Strata 0.2.23 release notes](https://github.com/Niko1221/Strata/releases/tag/v0.2.23)
fullDescription: |
**Before you begin**

Clone this template to run a compatible language model locally on an NVIDIA GPU. Select the model files and give the model a public name, which clients use in OpenAI-compatible requests.

**Supported engines**

The image ships three engine programs. The family that `MODEL_SOURCE` names decides which one runs.
- `strata-engine`: `qwen`, `coder`, `swift`, `unsloth`, `gyro`, `nvfp4` (Qwen3.8-Flash-Next) and `qwen36` (Qwen3.6-35B-A3B).
- `strata-hy4`: `hy4-flash` (Hy4 Flash, builds `SQ-64`, `SQ-96`, `SQ-128`).
- `strata-inkling`: `inkling-2-mini` (builds `SQ-10`, `SQ-15`, `SQ-20`, and Unsloth GGUF builds such as `UD-Q4_K_XL`).

**Environment variable setup**

- `MODEL_SOURCE`: `hf://<repo> --include <file>`. The files to download. Repeat the source, separated by commas without spaces, when a build has several files. Every listed file is handed to setup.py, including files from other repositories such as a vision projector. The chart reads the setup.py family and build from the model files of the official repositories, so list the files of one build only. For a mirror repository, set `strata.family` and `strata.model` in values.yaml. A pinned snapshot adds `--revision <sha>` on each segment.
- `MODEL_NAME`: the public model id and OpenAI alias, for example `hy4-flash-sq-96` or `qwen3.8-flash-next-ud-iq4_xs`.
- `MODEL_MODE`: `chat`.
- `MODEL_SUPPORTS`: Vision / Tools / Thinking / None. Vision turns the engine's image reader on. Hy4-Flash and Inkling-2-Mini then need their `*-Vision.strata` file in `MODEL_SOURCE`.
- `ENGINE_ARGS`: extra options, such as `--context 131072 --kv int8 --parallel 1`. Options that setup.py declares go to setup.py. Any other option, such as `--vram-experts-gb 12` or `--spec-k 4`, goes to the engine and overrides the value setup wrote. Options after a bare `--` always go to the engine. `--max-context` and `--ctx` mean `--context`. `--draft off|mtp|dflash2|dfly2|dspark` picks the drafter. Do not pass `--family`, `--model`, `--gguf-dir`, `--models-dir`, `--host`, `--port`, `--gpu`, or `--vision`; the chart owns those.
- `LOG_LEVEL`: `debug`, `info`, `warn`, or `error`.
- `STRATA_REQUIRED_GPU_MEMORY`: VRAM quota from `1Gi` to `23Gi`. Equivalent examples are `8Gi`, `8192`, or `8192Mi`. Sets `nvidia.com/gpumem` in MiB.
- `STRATA_MEMORY_LIMIT`: container memory, `2Gi` to `84Gi`. The memory request is fixed at `2Gi`. Size the limit for the model, its KV cache, and the runtime.
- `STRATA_CPU_LIMIT`: CPU for the engine, 1 to 20 cores. The CPU request is fixed at 200m. Saving a resource setting relaunches the engine.

**Examples**

- Hy4 Flash SQ-96 (`hy4-flash` / `SQ-96`): `MODEL_SOURCE` with `Hy4-Flash-SQ-96.strata` and `Hy4-Flash-Engram-Q8.strata` from `strata-engine/Hy4-Flash-Strata`.

`hf://strata-engine/Hy4-Flash-Strata --include Hy4-Flash-SQ-96.strata,hf://strata-engine/Hy4-Flash-Strata --include Hy4-Flash-Engram-Q8.strata`

- Inkling-2-Mini SQ-20 (`inkling-2-mini` / `SQ-20`): `MODEL_SOURCE` with `Inkling-2-Mini-SQ-20.strata` from `strata-engine/Inkling-2-Mini-Strata`.
- Qwen3.8-Flash-Next UD-IQ4_XS-v31 (`unsloth` / `UD-IQ4_XS-v31`): `MODEL_SOURCE` with the four `UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-0000N-of-00004.gguf` shards (replace `N` with 1 through 4) from `unsloth/Qwen3.8-Flash-Next-GGUF`.
- Qwen3.8-Flash-Next NVFP4 (`nvfp4` / `NVFP4`): `MODEL_SOURCE` with the whole pack repository. The files keep the repository's folder layout.

**How it works**

`llm-init` downloads the files named by `MODEL_SOURCE` into the shared Hugging Face cache and writes the ready mark. The Strata container waits for that mark, links the downloaded files into its own data directory, and runs `setup.py` for the family and build those files belong to. setup.py checks the files, prepares the tokenizer and packs, and writes the run config for the right engine. The two containers share run state through Common and can run on different nodes.

**Drafters**

- Qwen3.8-Flash-Next families: setup.py picks MTP or DFlash2. `--draft dflash2` fetches the DFlash2 pack instead of the ~5 GB MTP layer.
- Hy4-Flash: DFly2 is on by default. `--draft off` turns it off.
- Inkling-2-Mini: this template requests DSpark by default. `--draft off` turns it off.

**Components and access**

- **Strata** (port 8080): runs the model. The Strata UI entrance opens this port and does not wait for the weights to finish loading.
- **llm-init** (port 8090): downloads the model, shows progress, and provides the OpenAI-compatible API, proxying to Strata.

**Accelerator**

NVIDIA CUDA only, using `docker.io/beclab/niko1221-strata:0.2.23-cuda13`. Set `STRATA_REQUIRED_GPU_MEMORY` to the VRAM quota.

**Model storage**

Weight files live in `appCommon/huggingface`, mounted read-only in the engine at `/cache/hf/hub`. Each clone writes its setup output under `appCommon/huggingface/strata-data/<release>`. A new image keeps downloaded drafters and prepares the packs again.

**Resource tips**

- Raise memory and GPU quota to the model before use. A large model will not start on the chart's small defaults.
- setup.py plans memory from this container's limits, and the engine's CPU thread pool follows the CPU limit.
developer: Niko1221
website: https://github.com/Niko1221/Strata
sourceCode: https://github.com/Niko1221/Strata
submitter: Niko1221, Olares
locale:
- en-US
- zh-CN
- fr-FR
- de-DE
- es-ES
- it-IT
- ja-JP
license:
- text: MIT
url: https://github.com/Niko1221/Strata/blob/main/LICENSE

accelerator:
# nvidia — discrete GPU; STRATA_REQUIRED_GPU_MEMORY -> nvidia.com/gpumem (bare MiB)
- mode: nvidia
limitedCpu: "-1"
requiredCpu: "-1"
requiredDisk: 50Mi
limitedDisk: 500Gi
limitedMemory: "-1"
requiredMemory: "-1"
requiredGPUMemory: "-1"
limitedGPUMemory: "-1"
supportArch:
- amd64
runAsUser: true
permission:
appCache: true
appData: true
appCommon: true
options:
apiTimeout: 0
LLMGatewaySupported: true
allowMultipleInstall: true
shared: true
templateOnly: true
dependencies:
- name: olares
version: '>=1.12.7-0'
type: system
envs:
- envName: MODEL_SOURCE
required: true
type: string
editable: true
applyOnChange: true
description: "Example: hf://strata-engine/Hy4-Flash-Strata --include Hy4-Flash-SQ-96.strata,hf://strata-engine/Hy4-Flash-Strata --include Hy4-Flash-Engram-Q8.strata. One or more hf://<owner>/<repo> segments separated by commas, no spaces around the commas. Each segment may add --include <file or glob>, --exclude <glob>, and --revision <sha>. Every listed file, from every repository, is handed to setup.py."
regex: '^(?=.{0,8192}$)hf://[A-Za-z0-9][A-Za-z0-9._-]{0,95}/[A-Za-z0-9][A-Za-z0-9._-]{0,95}(?:[ ]+--(?:include|exclude)[ ]+[A-Za-z0-9._*?/+\[\]-]+|[ ]+--revision[ ]+[A-Za-z0-9._/-]+)*(?:,hf://[A-Za-z0-9][A-Za-z0-9._-]{0,95}/[A-Za-z0-9][A-Za-z0-9._-]{0,95}(?:[ ]+--(?:include|exclude)[ ]+[A-Za-z0-9._*?/+\[\]-]+|[ ]+--revision[ ]+[A-Za-z0-9._/-]+)*)*$'
- envName: MODEL_NAME
required: true
type: string
editable: true
applyOnChange: true
description: "Example: hy4-flash-sq-96. Public model id and OpenAI alias: 1 to 128 lowercase letters, digits, dot, underscore, or hyphen, starting with a letter or digit."
regex: '^[a-z0-9][a-z0-9._-]{0,127}$'
- envName: MODEL_MODE
required: true
type: string
editable: true
applyOnChange: true
default: chat
options:
- title: Chat
value: chat
- envName: MODEL_SUPPORTS
required: true
default: ""
type: string
editable: true
applyOnChange: true
multiSelect: true
splitter: ","
options:
- title: Vision
value: vision
- title: Tools
value: tools
- title: Thinking
value: thinking
- title: None
value: none
description: "Capabilities to publish on the model card. Vision also turns the engine image reader on. Pick None alone when the model has no extra capabilities."
- envName: ENGINE_ARGS
required: true
default: ""
type: string
editable: true
applyOnChange: true
description: "Example: --context 131072 --kv int8 --parallel 1 --vram-experts-gb 12. Up to 1024 characters of --option and value tokens separated by spaces; no quotes or shell characters. Options setup.py knows go to setup.py; other options go to the engine and override setup's value. Options after a bare -- always go to the engine. --draft off|mtp|dflash2|dfly2|dspark picks the drafter. Family, model, files, host, port, GPU, backend, and vision are managed by the chart and rejected here."
regex: '^(?=[ -~]{0,1024}$)(?!.*(?:^|[ ])--(?:family|model|native|engram|data-dir|models-dir|move-data|set-default-data-dir|gguf-dir|host|port|api-key|backend|vision|gpus?|prebuilt|build|setup|yes|no-start|check|update|inspect|browser|no-browser|skip-build|rollback-engine|cuda|serve|export-tokenizer|info)(?:[ =]|$))[ ]*(?:(?:--[a-z0-9][a-z0-9-]*(?:=-?[A-Za-z0-9._:,/+@%][A-Za-z0-9._:,/+@%-]*)?|--)(?:[ ]+(?:--[a-z0-9][a-z0-9-]*(?:=-?[A-Za-z0-9._:,/+@%][A-Za-z0-9._:,/+@%-]*)?|--|-?[A-Za-z0-9._:,/+@%][A-Za-z0-9._:,/+@%-]*))*)?[ ]*$'
- envName: LOG_LEVEL
required: false
type: string
editable: true
applyOnChange: true
default: "info"
options:
- title: Debug
value: debug
- title: Info
value: info
- title: Warn
value: warn
- title: Error
value: error
- envName: HF_ENDPOINT
required: false
applyOnChange: true
valueFrom:
envName: OLARES_SYSTEM_HUGGINGFACE_SERVICE
- envName: HF_TOKEN
required: false
applyOnChange: true
valueFrom:
envName: OLARES_SYSTEM_HUGGINGFACE_TOKEN
- envName: STRATA_CPU_REQUEST
required: true
default: "200m"
type: string
editable: false
applyOnChange: false
description: "CPU request for the Strata engine, fixed at 200m. The engine can use up to STRATA_CPU_LIMIT."
regex: '^(?:[1-9]|1[0-9]|20|[1-9][0-9]{2,3}m|1[0-9]{4}m|20000m)$'
- envName: STRATA_MEMORY_REQUEST
required: true
default: "2Gi"
type: string
editable: false
applyOnChange: false
description: "Container memory request for the Strata engine, fixed at 2Gi so the app schedules beside other apps. The engine can use up to STRATA_MEMORY_LIMIT."
regex: '^(?:(?:[1-9]|[1-7][0-9]|8[0-4])Gi|(?:51[2-9]|5[2-9][0-9]|[6-9][0-9]{2}|[1-9][0-9]{3}|[1-7][0-9]{4}|8[0-5][0-9]{3}|8600[0-9]|8601[0-6])Mi)$'
- envName: STRATA_CPU_LIMIT
required: true
type: int
editable: true
applyOnChange: true
description: "CPU limit for the Strata engine: a whole number of cores from 1 to 20 (for example 19). Saving this relaunches the engine. The thread pool follows this limit."
regex: '^(?:[1-9]|1[0-9]|20)$'
- envName: STRATA_MEMORY_LIMIT
required: true
type: string
editable: true
applyOnChange: true
description: "Container memory limit, 2Gi to 84Gi or 2048Mi to 86016Mi. Include weights, KV cache, and runtime. Strata plans the model's RAM and GPU use from this limit at each start. Example: 80Gi."
regex: '^(?:(?:[2-9]|[1-7][0-9]|8[0-4])Gi|(?:204[89]|20[5-9][0-9]|2[1-9][0-9]{2}|[3-9][0-9]{3}|[1-7][0-9]{4}|8[0-5][0-9]{3}|8600[0-9]|8601[0-6])Mi)$'
- envName: STRATA_REQUIRED_GPU_MEMORY
required: true
type: string
editable: true
applyOnChange: true
description: "GPU memory quota: 1Gi to 23Gi, or 1024 to 23552 MiB written as 8192 or 8192Mi. Sets nvidia.com/gpumem in MiB."
regex: '^(?:(?:[1-9]|1[0-9]|2[0-3])Gi|(?:102[4-9]|10[3-9][0-9]|1[1-9][0-9]{2}|[2-9][0-9]{3}|1[0-9]{4}|2[0-2][0-9]{3}|23[0-4][0-9]{2}|235[0-4][0-9]|2355[0-2])(?:Mi)?)$'
69 changes: 69 additions & 0 deletions stratallmbasev3/i18n/de-DE/OlaresManifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
metadata:
description: "Eine Vorlage zum lokalen Ausführen eines Sprachmodells mit Strata"
title: Strata-Engine-Basis

spec:
upgradeDescription: |
Die Strata-Engine wurde auf Version 0.2.23 aktualisiert.

[Versionshinweise zu Strata 0.2.23](https://github.com/Niko1221/Strata/releases/tag/v0.2.23)
fullDescription: |
**Vor dem Start**

Klonen Sie diese Vorlage, um ein kompatibles Sprachmodell auf Ihrer NVIDIA-GPU auszuführen. Wählen Sie die Dateien und vergeben Sie einen öffentlichen Modellnamen für Anfragen an die OpenAI-kompatible API.

**Unterstützte Engines**

Die anhand der Dateien erkannte Modellfamilie bestimmt, welche der drei Engines startet.

- `strata-engine` — Qwen3.8-Flash-Next (`qwen`, `coder`, `swift`, `unsloth`, `gyro`, `nvfp4`), Qwen3.6-35B-A3B (`qwen36`).
- `strata-hy4` — Hy4 Flash (`SQ-64`, `SQ-96`, `SQ-128`).
- `strata-inkling` — Inkling-2-Mini (`SQ-10`, `SQ-15`, `SQ-20`, Unsloth GGUF, `UD-Q4_K_XL`).

**Umgebungsvariablen**

- `MODEL_SOURCE` — `hf://<repo> --include <file>`. Geben Sie die Dateien einer einzelnen Modellvariante an. Wiederholen Sie die Quelle für jede Datei, auch für einen Bildprojektor. Trennen Sie die Einträge durch Kommas ohne Leerzeichen. Mit `--revision <sha>` pro Eintrag legen Sie eine Revision fest. Für ein Spiegel-Repository setzen Sie `strata.family` und `strata.model` in `values.yaml`.
- `MODEL_NAME` — Öffentlicher Modellname für API-Anfragen. `hy4-flash-sq-96`, `qwen3.8-flash-next-ud-iq4_xs`.
- `MODEL_MODE` — `chat`.
- `MODEL_SUPPORTS` — Vision / Tools / Thinking / None. Wählen Sie die Fähigkeiten des Modells. Falls keine zutrifft, wählen Sie nur None. Vision aktiviert die Bildverarbeitung und erfordert bei Hy4 Flash und Inkling-2-Mini die passende Bilddatei. `*-Vision.strata`.
- `ENGINE_ARGS` — `--context 131072 --kv int8 --parallel 1`. Beispiel für Kontextlänge und Parallelität. Unterstützte Optionen gehen an `setup.py`. Weitere Optionen überschreiben die Engine-Einstellungen. Nach `--` gehen Optionen direkt an die Engine. `--max-context` / `--ctx` stehen für `--context`. Familie, Modell, Dateien, Host, Port, GPU und Bildverarbeitung verwaltet das Chart. `--draft off|mtp|dflash2|dfly2|dspark`.
- `LOG_LEVEL` — `debug`, `info`, `warn`, `error`.
- `STRATA_REQUIRED_GPU_MEMORY` — Grafikspeicherkontingent von `1Gi`–`23Gi`. Die drei Beispielwerte sind gleichwertig. `8Gi` = `8192` = `8192Mi`.
- `STRATA_MEMORY_LIMIT` — Arbeitsspeicherlimit von `2Gi`–`84Gi` für Gewichte, KV-Cache und Laufzeitumgebung. Reserviert werden `2Gi`.
- `STRATA_CPU_LIMIT` — Limit von 1 bis 20 Kernen bei einer Reservierung von `200m`. Das Speichern einer Ressourceneinstellung startet die Engine neu.

**Modellbeispiele**

- Hy4 Flash SQ-96 — `strata-engine/Hy4-Flash-Strata`: `Hy4-Flash-SQ-96.strata`, `Hy4-Flash-Engram-Q8.strata`. Gewichte und Engram-Tabelle. Für die Bildverarbeitung zusätzlich die Bilddatei angeben.

`hf://strata-engine/Hy4-Flash-Strata --include Hy4-Flash-SQ-96.strata,hf://strata-engine/Hy4-Flash-Strata --include Hy4-Flash-Engram-Q8.strata`

- Inkling-2-Mini SQ-20 — `strata-engine/Inkling-2-Mini-Strata`: `Inkling-2-Mini-SQ-20.strata`. Erkannte Gewichtsdatei dieser Variante.
- Qwen3.8-Flash-Next UD-IQ4_XS-v31 — `unsloth/Qwen3.8-Flash-Next-GGUF`: `UD-IQ4_XS/Qwen3.8-Flash-Next-UD-IQ4_XS-0000N-of-00004.gguf`. Alle vier Teildateien angeben. `N` durch die Ziffern 1 bis 4 ersetzen.
- Qwen3.8-Flash-Next NVFP4 — Das vollständige Repository auswählen. Seine Verzeichnisstruktur bleibt erhalten.

**Startablauf**

`llm-init` lädt die Dateien aus `MODEL_SOURCE` in den gemeinsamen Hugging-Face-Cache. Sobald sie bereitstehen, verknüpft Strata sie mit seinem Arbeitsverzeichnis. `setup.py` prüft die Dateien, bereitet Tokenizer und Pakete vor und schreibt die Engine-Konfiguration. Beide Komponenten teilen ihren Laufzeitstatus über Common.

**Spekulative Dekodierung**

- Qwen3.8-Flash-Next — Das Setup wählt MTP oder DFlash2. `--draft dflash2` fordert das DFlash2-Paket an.
- Hy4 Flash verwendet standardmäßig DFly2. Für Inkling-2-Mini fordert diese Vorlage standardmäßig DSpark an. `--draft off` schaltet die spekulative Dekodierung ab.

**Komponenten und Zugriff**

- **Strata** (8080) — Führt das Modell aus. Die Oberfläche lässt sich schon beim Laden der Gewichte öffnen.
- **llm-init** (8090) — Zeigt den Downloadfortschritt an und leitet Anfragen der OpenAI-kompatiblen API an Strata weiter.

**Beschleuniger**

Verwendet NVIDIA CUDA. `STRATA_REQUIRED_GPU_MEMORY` legt das Grafikspeicherkontingent fest. `docker.io/beclab/niko1221-strata:0.2.23-cuda13`.

**Modellspeicher**

Die Gewichte liegen in `appCommon/huggingface` und sind unter `/cache/hf/hub` schreibgeschützt eingebunden. Jeder Klon schreibt seine aufbereiteten Dateien nach `appCommon/huggingface/strata-data/<release>`. Bei einem Imagewechsel bleiben Downloads erhalten und die Pakete werden erneut vorbereitet.

**Ressourcenplanung**

Passen Sie Arbeits- und Grafikspeicher vor dem Start an das Modell an. `setup.py` plant anhand der Speicherlimits. Die Anzahl der CPU-Threads richtet sich nach dem CPU-Limit.
Loading