AbteeXAILabs commited on
Commit
8de8952
·
verified ·
1 Parent(s): a58b642

feat: initial LumynaX scaffold (card v6 + quickstart + manifest + Modelfile + Space scaffold)

Browse files
LICENSE.txt ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ LumynaX release package — distribution scaffold
2
+
3
+ This Hugging Face repository contains the LumynaX release scaffold for the
4
+ upstream model identified in `release_export_manifest.json`. The model weights
5
+ themselves remain governed by the upstream licence at `metadata.upstream_repo`
6
+ and are fetched by the runtime via Hugging Face Hub when you execute
7
+ `quickstart.py`.
8
+
9
+ The scaffold (configs, manifest, quickstart, ollama Modelfile, Space app) is
10
+ released under the MIT licence by AbteeX AI Labs (Aotearoa New Zealand). Your
11
+ use of the *upstream weights* is governed by the *upstream licence*; this file
12
+ does not relicense them.
13
+
14
+ Provenance, residency and audit obligations are defined in
15
+ `release_export_manifest.json` and the model card.
README.md ADDED
@@ -0,0 +1,317 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ language:
6
+ - en
7
+ - mi
8
+ tags:
9
+ - abteex-ai-labs
10
+ - aotearoa
11
+ - doc-ai
12
+ - layout
13
+ - layoutlm
14
+ - local-first
15
+ - lumynax
16
+ - new-zealand
17
+ - sovereign-ai
18
+ ---
19
+
20
+ <p align="center"><img src="docs/lumynax-overview.svg" alt="LumynaX Doc LayoutLMv3 Base (document layout+text) release overview" width="100%" /></p>
21
+
22
+ <!-- lumynax-public-release-card:v6 -->
23
+
24
+ <h1 align="center">LumynaX Doc LayoutLMv3 Base (document layout+text)</h1>
25
+
26
+ <p align="center"><em>&ldquo;Sovereign intelligence, held in the light.&rdquo;</em><br/><em>Ko te m&#257;rama te t&#363;&#257;papa &mdash; the light is the foundation.</em></p>
27
+
28
+ <p align="center"><strong>A LumynaX release from AbteeX AI Labs &mdash; Aotearoa New Zealand.</strong></p>
29
+
30
+ <p align="center">
31
+ <a href="#-quickstart"><b>Quickstart</b></a> &middot;
32
+ <a href="#-runtime-architecture"><b>Architecture</b></a> &middot;
33
+ <a href="#-model-profile"><b>Profile</b></a> &middot;
34
+ <a href="#-capability-profile"><b>Capability</b></a> &middot;
35
+ <a href="#-provenance--license"><b>Provenance</b></a> &middot;
36
+ <a href="#-validation"><b>Validation</b></a> &middot;
37
+ <a href="#-companion-products"><b>Companions</b></a>
38
+ </p>
39
+
40
+ <p align="center"><img alt="LumynaX: release" src="https://img.shields.io/badge/LumynaX-release-e08a2c?style=for-the-badge" /> <img alt="Family: layoutlm" src="https://img.shields.io/badge/Family-layoutlm-9a5416?style=for-the-badge" /> <img alt="Runtime: transformers" src="https://img.shields.io/badge/Runtime-transformers-726b62?style=for-the-badge" /> <img alt="Modes: text+vision" src="https://img.shields.io/badge/Modes-text+vision-4d6b44?style=for-the-badge" /> <img alt="Params: 0.13B" src="https://img.shields.io/badge/Params-0.13B-0a0a0b?style=for-the-badge" /> <img alt="Quant: fp32 safetensors" src="https://img.shields.io/badge/Quant-fp32%20safetensors-111827?style=for-the-badge" /> <img alt="Context: 512%20tok" src="https://img.shields.io/badge/Context-512%20tok-111827?style=for-the-badge" /> <img alt="License: cc-by-nc-4.0" src="https://img.shields.io/badge/License-cc--by--nc--4.0-9a5416?style=for-the-badge" /> <img alt="Sovereignty: tier%203" src="https://img.shields.io/badge/Sovereignty-tier%203-4d6b44?style=for-the-badge" /> <img alt="Audit: pass" src="https://img.shields.io/badge/Audit-pass-4d6b44?style=for-the-badge" /> <img alt="Access: public%20&%20non--gated" src="https://img.shields.io/badge/Access-public%20&%20non----gated-0a0a0b?style=for-the-badge" /> <img alt="Card: v6" src="https://img.shields.io/badge/Card-v6-111827?style=for-the-badge" /></p>
41
+
42
+ <p align="center"><kbd>Quality: <b>4/5</b></kbd> &middot; <kbd>Lightweight: <b>5/5</b></kbd> &middot; <kbd>Sovereignty: <b>3/5</b></kbd> &middot; <kbd>Tools: <b>no</b></kbd> &middot; <kbd>JSON: <b>yes</b></kbd> &middot; <kbd>Context: <b>512 tok</b></kbd></p>
43
+
44
+ ---
45
+
46
+ ## 📦 Executive Summary
47
+
48
+ > `AbteeXAILab/lumynax-doc-layoutlmv3-base` is a **complete LumynaX release package**: model artifact, `quickstart.py`, `requirements.txt`, `release_export_manifest.json`, `checksums.sha256`, license notice, and optional Ollama / Space scaffolds shipped as **one downloadable contract**. Clone whole, verify by checksum, and run close to the data it serves.
49
+
50
+ > **LumynaX-infused** means the upstream artifact is presented through the LumynaX release layer: local-first runtime scaffolding, LumynaX assistant identity, inference-chain metadata, integrity files, and Aotearoa New Zealand-oriented workflow positioning. The release manifest records this as a LumynaX *packaging and inference-chain layer* around the listed upstream artifact &mdash; it does **not** claim a private LumynaX weight merge.
51
+
52
+ ## 🧭 Runtime Architecture
53
+
54
+ <p align="center"><img src="docs/lumynax-runtime-flow.svg" alt="LumynaX runtime flow" width="100%" /></p>
55
+
56
+ Mermaid graph (interactive on Hugging Face & GitHub):
57
+
58
+ ```mermaid
59
+ flowchart LR
60
+ R["⮕ Request"] --> C["🛡 Data Capsule<br/>policy envelope"]
61
+ C -->|allow| MR["🧭 MaramaRoute<br/>sovereign router"]
62
+ MR -->|score & select| LLM[(LumynaX Model)]
63
+ LLM --> O["📤 Response"]
64
+ O --> A["📓 Audit Ledger<br/>hash-chained"]
65
+ classDef paper fill:#fffefa,stroke:#0a0a0b,color:#0a0a0b,stroke-width:1.4px;
66
+ classDef accent fill:#e08a2c,stroke:#9a5416,color:#0a0a0b,stroke-width:1.4px;
67
+ classDef ink fill:#0a0a0b,stroke:#0a0a0b,color:#fffefa,stroke-width:1.4px;
68
+ class R,O paper
69
+ class C,MR accent
70
+ class LLM,EMB,A ink
71
+ ```
72
+
73
+ Each step is observable:
74
+
75
+ | Step | What happens | Why |
76
+ | --- | --- | --- |
77
+ | **Request** | A client sends a prompt + declared purpose, jurisdiction, sensitivity. | Intent must be declared, not inferred. |
78
+ | **Data Capsule** | A policy envelope describes what can / cannot happen to the data. | Sovereignty is enforced at the data, not the wire. |
79
+ | **MaramaRoute** | The sovereign router scores candidates by jurisdiction, runtime, modality, task fit. | Right model for the work, not the loudest. |
80
+ | **LumynaX Model** | This package serves the inference, local-first by default. | Sensitive context never leaves the operator&rsquo;s environment. |
81
+ | **Audit Ledger** | A hash-chained record persists capsule, decision, request hash, obligations. | Tamper-evident provenance for the whole trace. |
82
+
83
+ ## ⚡ Quickstart
84
+
85
+ **Clone the whole release** — every file matters, the package is a contract:
86
+
87
+ ```bash
88
+ hf download AbteeXAILab/lumynax-doc-layoutlmv3-base --local-dir lumynax-doc-layoutlmv3-base
89
+ cd lumynax-doc-layoutlmv3-base
90
+ pip install -r requirements.txt
91
+ python quickstart.py --interactive
92
+ ```
93
+
94
+ **Python:**
95
+
96
+ ```python
97
+ from transformers import AutoTokenizer, AutoModelForCausalLM
98
+
99
+ tokenizer = AutoTokenizer.from_pretrained("AbteeXAILab/lumynax-doc-layoutlmv3-base", trust_remote_code=True)
100
+ model = AutoModelForCausalLM.from_pretrained("AbteeXAILab/lumynax-doc-layoutlmv3-base", device_map="auto", trust_remote_code=True)
101
+ inputs = tokenizer("Who are you? Answer as LumynaX in two sentences.", return_tensors="pt").to(model.device)
102
+ print(tokenizer.decode(model.generate(**inputs, max_new_tokens=160)[0], skip_special_tokens=True))
103
+ ```
104
+
105
+ **Verify integrity before launch:**
106
+
107
+ ```bash
108
+ sha256sum "model.safetensors"
109
+ cat checksums.sha256
110
+ ```
111
+
112
+ ```powershell
113
+ Get-FileHash -Algorithm SHA256 "model.safetensors"
114
+ Get-Content checksums.sha256
115
+ ```
116
+
117
+ ## 📐 Model Profile
118
+
119
+ <table>
120
+ <tr><td>
121
+
122
+ **Release identity**
123
+
124
+ | Field | Value |
125
+ | --- | --- |
126
+ | Release | `LumynaX Doc LayoutLMv3 Base (document layout+text)` |
127
+ | Repository | `AbteeXAILab/lumynax-doc-layoutlmv3-base` |
128
+ | Family | `layoutlm` |
129
+ | Mode | `Tiny local-first package` |
130
+ | Card schema | `lumynax-public-release-card:v6` |
131
+
132
+ </td><td>
133
+
134
+ **Runtime profile**
135
+
136
+ | Field | Value |
137
+ | --- | --- |
138
+ | Runtime | `transformers` |
139
+ | Prompt format | `layoutlm` |
140
+ | Modalities | `text, vision` |
141
+ | Context window | `512` tokens |
142
+ | Quantization | `fp32 safetensors` |
143
+
144
+ </td></tr>
145
+ <tr><td>
146
+
147
+ **Artifact**
148
+
149
+ | Field | Value |
150
+ | --- | --- |
151
+ | Primary | `model.safetensors` |
152
+ | Weight size | `—` |
153
+ | Parameters | `0.13B` |
154
+ | Quality rank | `2` (1 best) |
155
+ | Cost rank | `1` (1 cheapest) |
156
+
157
+ </td><td>
158
+
159
+ **Provenance**
160
+
161
+ | Field | Value |
162
+ | --- | --- |
163
+ | Upstream / base | `microsoft/layoutlmv3-base` |
164
+ | Source | `Microsoft LayoutLMv3` |
165
+ | License | `cc-by-nc-4.0` |
166
+ | Sovereignty tier | `3` of 5 |
167
+ | Audit | `pass` |
168
+
169
+ </td></tr>
170
+ </table>
171
+
172
+ ## 📊 Capability Profile
173
+
174
+ <p align="center"><img src="docs/lumynax-capability.svg" alt="Capability profile bars" width="100%" /></p>
175
+
176
+ > **Primary fit.** Fast smoke tests, demos, packaging validation, and low-resource local runs.
177
+
178
+ | Signal | Reading |
179
+ | --- | --- |
180
+ | Quality rank | `2` (1 = strongest in family) |
181
+ | Cost rank | `1` (1 = lightest weight) |
182
+ | Sovereignty tier | `3` of 5 |
183
+ | Tool calling | ❌ not supported |
184
+ | JSON mode | ✅ supported |
185
+ | Identity behaviour | Identifies as LumynaX while keeping upstream provenance visible. |
186
+ | Operational style | Local-first package with explicit files, checksums, and reproducible quickstarts. |
187
+
188
+ ## 🛡️ Sovereignty Contract
189
+
190
+ > **Sovereignty is a design property, not a deployment option.**
191
+
192
+ | Field | Value |
193
+ | --- | --- |
194
+ | Publisher | AbteeX AI Labs |
195
+ | Family | LumynaX sovereign release family |
196
+ | Sovereign intent | Local-first deployment near governed data, with explicit provenance and controlled human review. |
197
+ | Sovereignty tier | `3` of 5 |
198
+ | Runtime residency | `transformers` can be deployed inside an operator-approved environment. |
199
+ | Primary artifact | `model.safetensors` &mdash; ships alongside manifest, checksums, quickstart, requirements, and license files. |
200
+ | License discipline | Surface upstream license metadata so downstream users can verify redistribution and usage terms. |
201
+ | Audit expectation | Record repo id, artifact checksum, runtime command, prompt template, operator, deployment environment. |
202
+ | Router readiness | First-class with [LumynaX MaramaRoute](https://huggingface.co/AbteeXAILab/marama-route). |
203
+ | Policy readiness | First-class with [AbteeX SovereignCode](https://huggingface.co/AbteeXAILab/sovereigncode). |
204
+
205
+ ## 📁 Runtime Files
206
+
207
+ ```text
208
+ lumynax-doc-layoutlmv3-base/
209
+ ├── README.md # this card
210
+ ├── quickstart.py # smoke runner
211
+ ├── requirements.txt # pinned deps
212
+ ├── release_export_manifest.json # full release metadata
213
+ ├── checksums.sha256 # integrity verification
214
+ ├── LICENSE.txt # license notice
215
+ ├── ollama/Modelfile # optional Ollama runtime
216
+ ├── hf_space/app.py # optional Space scaffold
217
+ ├── docs/lumynax-overview.svg # release banner
218
+ ├── docs/lumynax-runtime-flow.svg # runtime architecture
219
+ ├── docs/lumynax-capability.svg # capability profile
220
+ └── model.safetensors # primary artifact
221
+ ```
222
+
223
+ ⚠️ **Keep the full set together.** Removing the manifest, checksums, or license file breaks the release contract.
224
+
225
+ ## 💬 Prompting Contract
226
+
227
+ **Preferred opening prompt:**
228
+
229
+ ```text
230
+ Who are you? What files do I need to keep together to run this package locally?
231
+ ```
232
+
233
+ > **Expected behaviour.** The assistant identifies as LumynaX, explains that this is a LumynaX model-infusion release, and keeps upstream provenance visible.
234
+
235
+ **Default system prompt:**
236
+
237
+ ```text
238
+ You are LumynaX operating from the LumynaX Doc LayoutLMv3 Base (document layout+text) package identity. Be helpful, clear, and honest about provenance. Identify upstream models when asked. Do not invent biographical claims about named people without verified context.
239
+ ```
240
+
241
+ ## ✅ Validation
242
+
243
+ | Check | Result |
244
+ | --- | --- |
245
+ | Runtime audit | ✅ `pass` |
246
+ | Public access | ✅ `public and non-gated` |
247
+ | Anonymous metadata access | ✅ `true` |
248
+ | Anonymous file listing | ✅ `true` |
249
+ | Quickstart syntax | ✅ `pass` |
250
+ | Manifest references | ✅ `pass` |
251
+ | Checksum references | ✅ `pass` |
252
+
253
+ > The audit confirms public access, release files, manifest references, checksum references, weight artifact presence, and quickstart syntax. It does **not** guarantee that every laptop has enough RAM, VRAM, disk, or recent runtime build for the largest packages.
254
+
255
+ ## 🔗 Provenance & License
256
+
257
+ | Field | Value |
258
+ | --- | --- |
259
+ | **Publisher** | AbteeX AI Labs |
260
+ | **Family** | LumynaX model and inference-chain release family |
261
+ | **Upstream / base** | `microsoft/layoutlmv3-base` |
262
+ | **Source** | `Microsoft LayoutLMv3` |
263
+ | **License metadata** | `cc-by-nc-4.0` |
264
+
265
+ > **Respect the upstream model licence** and keep attribution files with redistributed copies. Do not present this package as privately trained or weight-merged unless the release manifest explicitly says weight adaptation was applied.
266
+
267
+ ## ⚠️ Limitations & Responsible Use
268
+
269
+ - Outputs can be **incorrect, incomplete, or biased**; validate important answers before use.
270
+ - Larger GGUF, MoE, multimodal, and frontier packages may require **substantial RAM, VRAM, disk space, and recent runtime builds**.
271
+ - For high-impact decisions, use **human review** and domain-specific evaluation.
272
+ - For sensitive data, prefer **local execution** and keep operational logs under your own governance policy.
273
+ - This card documents **package readiness and access** &mdash; it is *not* a benchmark claim.
274
+ - The assistant must **not invent biographical or organisational claims** about named people without verified context.
275
+
276
+ ## 🌿 Aotearoa Kaupapa
277
+
278
+ > LumynaX is built **in and for Aotearoa New Zealand**. Sovereignty is treated as a design property rather than a deployment option: the package documents where the model came from, what it can do, how to run it close to your data, and what it should not claim.
279
+
280
+ > *Ko te mārama te tūāpapa* &mdash; the light is the foundation.
281
+
282
+ ## 🤝 Companion Products
283
+
284
+ <table>
285
+ <tr>
286
+ <td width="33%" align="center"><h3>🛡️</h3><h4><a href="https://huggingface.co/AbteeXAILab/sovereigncode">AbteeX SovereignCode</a></h4><p>Local-first coding agent with Data Capsule policy controls, audit ledger, and human-review gates.</p></td>
287
+ <td width="33%" align="center"><h3>🧭</h3><h4><a href="https://huggingface.co/AbteeXAILab/marama-route">LumynaX MaramaRoute</a></h4><p>Sovereign model router across the LumynaX family. Filters by jurisdiction, residency, license, runtime, modality.</p></td>
288
+ <td width="33%" align="center"><h3>💡</h3><h4><a href="https://huggingface.co/spaces/AbteeXAILab/lumynax-live-demo">LumynaX Live Demo</a></h4><p>Public browser demo. Try identity, provenance, governance, and deployment prompts in one session.</p></td>
289
+ </tr>
290
+ <tr>
291
+ <td width="33%" align="center"><h4><a href="https://huggingface.co/spaces/AbteeXAILab/sovereigncode-demo">SovereignCode Live</a></h4><p>Interactive policy evaluator.</p></td>
292
+ <td width="33%" align="center"><h4><a href="https://huggingface.co/spaces/AbteeXAILab/marama-route-demo">MaramaRoute Live</a></h4><p>Interactive sovereign router.</p></td>
293
+ <td width="33%" align="center"><h4><a href="https://huggingface.co/AbteeXAILab">AbteeXAILab on HF</a></h4><p>The full LumynaX release family &mdash; 50 models and counting.</p></td>
294
+ </tr>
295
+ </table>
296
+
297
+ ## 🤖 Automation Notes
298
+
299
+ Automation should read these files before launching:
300
+
301
+ - `release_export_manifest.json`
302
+ - `checksums.sha256`
303
+ - `quickstart.py`
304
+ - `requirements.txt`
305
+ - `ollama/Modelfile` when present
306
+
307
+ ---
308
+
309
+ <p align="center"><em><b>Local roots, global work.</b> &middot; <b>Sovereignty is a design property, not a deployment option.</b></em></p>
310
+
311
+ <p align="center">
312
+ <a href="https://abteex.com"><b>abteex.com</b></a> &middot;
313
+ <a href="https://lumynax.com"><b>lumynax.com</b></a> &middot;
314
+ <a href="https://huggingface.co/AbteeXAILab"><b>huggingface.co/AbteeXAILab</b></a>
315
+ </p>
316
+
317
+ <p align="center"><sub>AbteeX AI Labs &middot; Aotearoa New Zealand &middot; LumynaX release card v6</sub></p>
UPLOAD_TO_HF.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Upload checklist (AbteeX AI Labs)
2
+
3
+ This scaffold was generated and pushed by `S:\hf-publish\add_8_more_models.py`.
4
+ The repo is structured to be cloned whole and verified locally before running.
5
+
6
+ ```bash
7
+ hf download AbteeXAILab/lumynax-doc-layoutlmv3-base --local-dir lumynax-doc-layoutlmv3-base
8
+ cd lumynax-doc-layoutlmv3-base
9
+ pip install -r requirements.txt
10
+ python quickstart.py --interactive
11
+ ```
12
+
13
+ To regenerate or refresh, re-run the script — `huggingface_hub.HfApi.upload_folder`
14
+ is idempotent.
VERSION.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ v0.1.0
checksums.sha256 ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ 601956b52f7e59484c150ec4b1e9b1186adc331bf92c4a7127834ba2ff70a968 LICENSE.txt
2
+ d0b4f9120ba026c00fa23cb84b4e1620a2e6436592e58155a5151653179572c0 VERSION.txt
3
+ 1315ecb8b10a8c8e68c989dec2f7be31dd33d5c65995c9caef8de5c3d9a24b73 ollama/Modelfile
4
+ b141f6ceeae529ff27d0eb419468ceec2d08d2339249dd943730161126eb29df quickstart.py
5
+ 04f98be098d22a2dcc6f4906dff7dea0a1075e4a41821e1e293a9de1cfa54890 release_export_manifest.json
6
+ dd873da1e34bee536b535b05ffe41bbeeacaa9d106db9463ae0f4abe2f07dff8 requirements.txt
docs/lumynax-capability.svg ADDED
docs/lumynax-overview.svg ADDED
docs/lumynax-runtime-flow.svg ADDED
hf_space/README.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: LumynaX Doc LayoutLMv3 Base (document layout+text)
3
+ colorFrom: yellow
4
+ colorTo: gray
5
+ sdk: gradio
6
+ sdk_version: 5.50.0
7
+ python_version: 3.11
8
+ app_file: app.py
9
+ pinned: false
10
+ license: apache-2.0
11
+ short_description: Scaffold Space for the lumynax-doc-layoutlmv3-base LumynaX release.
12
+ tags:
13
+ - abteex-ai-labs
14
+ - lumynax
15
+ - sovereign-ai
16
+ - new-zealand
17
+ ---
18
+
19
+ # LumynaX Doc LayoutLMv3 Base (document layout+text)
20
+
21
+ Scaffold Space for `AbteeXAILab/lumynax-doc-layoutlmv3-base`. The actual model weights are too large to host on a free Space.
22
+ Clone the package repo and run `quickstart.py` locally for the real inference path.
hf_space/app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import gradio as gr
3
+
4
+ REPO_ID = "AbteeXAILab/lumynax-doc-layoutlmv3-base"
5
+ UPSTREAM = "microsoft/layoutlmv3-base"
6
+ TITLE = "LumynaX Doc LayoutLMv3 Base (document layout+text)"
7
+
8
+ THEME_CSS = """
9
+ :root { --lx-paper:#fffefa; --lx-ink:#0a0a0b; --lx-amber:#e08a2c; }
10
+ body, .gradio-container { background: var(--lx-paper) !important; color: var(--lx-ink) !important; }
11
+ h1, h2, h3 { font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, serif; }
12
+ """
13
+
14
+ def chat_stub(message, history):
15
+ return (
16
+ f"This Space is a scaffold for **{TITLE}**. The upstream model is `{UPSTREAM}` "
17
+ f"and the LumynaX package repo is `{REPO_ID}`. Cloud inference for >100B MoE models "
18
+ f"is not run inside this free Space — clone the repo and run `quickstart.py` on a "
19
+ f"capable host. You asked: {message!r}."
20
+ )
21
+
22
+ with gr.Blocks(css=THEME_CSS, title=TITLE) as demo:
23
+ gr.Markdown(f"# {TITLE}\n*Sovereign intelligence, held in the light.*\n\nLumynaX release scaffold — clone `{REPO_ID}` for the full package.")
24
+ gr.ChatInterface(chat_stub, examples=["Explain LumynaX in 2 bullets.", "Why local-first AI for Aotearoa?"])
25
+
26
+ if __name__ == "__main__":
27
+ demo.launch()
hf_space/requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio==5.50.0
ollama/Modelfile ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # Upstream HF repo: microsoft/layoutlmv3-base
2
+ # Use 'ollama pull' on a converted GGUF mirror, or run via transformers (see quickstart.py).
3
+ FROM hf.co/microsoft/layoutlmv3-base
4
+
5
+ PARAMETER temperature 0.4
6
+ PARAMETER top_p 0.9
7
+ PARAMETER num_ctx 512
8
+
9
+ SYSTEM """You are LumynaX, the AbteeX AI Labs assistant from Aotearoa New Zealand. Ko te marama te tuapapa. Answer with care; cite uncertainty; refuse unsafe asks."""
quickstart.py ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ LumynaX Doc LayoutLMv3 Base (document layout+text) — LumynaX quickstart.
3
+
4
+ This script fetches the upstream model from Hugging Face and runs a short
5
+ LumynaX-flavoured prompt. Run it on a host that satisfies the resource budget
6
+ documented in the README (LumynaX Doc LayoutLMv3 Base (document layout+text)).
7
+
8
+ Usage:
9
+ python quickstart.py # one-shot demo prompt
10
+ python quickstart.py --interactive # REPL
11
+ python quickstart.py --gguf # use the GGUF mirror via llama-cpp
12
+
13
+ LumynaX package repo: https://huggingface.co/AbteeXAILab/lumynax-doc-layoutlmv3-base
14
+ Upstream weights: https://huggingface.co/microsoft/layoutlmv3-base
15
+ """
16
+ from __future__ import annotations
17
+ import argparse, os, sys
18
+
19
+ LUMYNAX_SYSTEM = (
20
+ "You are LumynaX, the AbteeX AI Labs assistant from Aotearoa New Zealand. "
21
+ "Ko te marama te tuapapa - the light is the foundation. "
22
+ "Answer with care, cite uncertainty, and prefer local-first reasoning. "
23
+ "Refuse unsafe, unlawful, or sovereignty-violating requests."
24
+ )
25
+ DEMO_PROMPT = "Explain in 3 bullets why local-first AI matters for Aotearoa New Zealand."
26
+
27
+ def _run_hf(prompt: str, interactive: bool):
28
+ import torch
29
+ from transformers import AutoModelForCausalLM, AutoTokenizer
30
+ print("[lumynax] Loading microsoft/layoutlmv3-base. This is a >100B MoE — multi-GPU or accelerate offload recommended.")
31
+ tok = AutoTokenizer.from_pretrained("microsoft/layoutlmv3-base", trust_remote_code=True)
32
+ model = AutoModelForCausalLM.from_pretrained(
33
+ "microsoft/layoutlmv3-base", device_map="auto", torch_dtype="auto", trust_remote_code=True
34
+ )
35
+ def chat(user):
36
+ messages = [
37
+ {"role": "system", "content": LUMYNAX_SYSTEM},
38
+ {"role": "user", "content": user},
39
+ ]
40
+ text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
41
+ inputs = tok(text, return_tensors="pt").to(model.device)
42
+ out = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.4)
43
+ return tok.decode(out[0, inputs["input_ids"].shape[-1]:], skip_special_tokens=True)
44
+ if interactive:
45
+ print("[lumynax] interactive mode — empty line exits.")
46
+ while True:
47
+ try: q = input("you> ").strip()
48
+ except EOFError: break
49
+ if not q: break
50
+ print("lumynax> " + chat(q))
51
+ else:
52
+ print(chat(prompt))
53
+
54
+
55
+ def _run_gguf(prompt: str, interactive: bool):
56
+ from llama_cpp import Llama
57
+ mirror = ""
58
+ if not mirror:
59
+ print("[lumynax] No community GGUF mirror registered for this build."); sys.exit(2)
60
+ print(f"[lumynax] Loading GGUF from {mirror}...")
61
+ llm = Llama.from_pretrained(
62
+ repo_id=mirror, filename="*Q4_K_M*.gguf",
63
+ n_ctx=512,
64
+ n_gpu_layers=int(os.environ.get("N_GPU_LAYERS", "-1")), verbose=False,
65
+ )
66
+ def chat(user):
67
+ out = llm.create_chat_completion(messages=[
68
+ {"role": "system", "content": LUMYNAX_SYSTEM},
69
+ {"role": "user", "content": user},
70
+ ], max_tokens=512, temperature=0.4)
71
+ return out["choices"][0]["message"]["content"]
72
+ if interactive:
73
+ while True:
74
+ try: q = input("you> ").strip()
75
+ except EOFError: break
76
+ if not q: break
77
+ print("lumynax> " + chat(q))
78
+ else:
79
+ print(chat(prompt))
80
+
81
+
82
+ def main():
83
+ p = argparse.ArgumentParser()
84
+ p.add_argument("--interactive", action="store_true")
85
+ p.add_argument("--prompt", default=DEMO_PROMPT)
86
+ p.add_argument("--gguf", action="store_true")
87
+ args = p.parse_args()
88
+ if args.gguf:
89
+ _run_gguf(args.prompt, args.interactive)
90
+ else:
91
+ _run_hf(args.prompt, args.interactive)
92
+
93
+
94
+ if __name__ == "__main__":
95
+ main()
release_export_manifest.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "release_id": "lumynax-doc-layoutlmv3-base",
3
+ "title": "LumynaX Doc LayoutLMv3 Base (document layout+text)",
4
+ "repo_id": "AbteeXAILab/lumynax-doc-layoutlmv3-base",
5
+ "version": "v0.1.0",
6
+ "publisher": "AbteeX AI Labs",
7
+ "publisher_org": "AbteeXAILab",
8
+ "jurisdiction": "NZ",
9
+ "residency": [
10
+ "NZ",
11
+ "AU",
12
+ "global"
13
+ ],
14
+ "upstream": {
15
+ "repo_id": "microsoft/layoutlmv3-base",
16
+ "license": "cc-by-nc-4.0",
17
+ "prompt_format": "layoutlm",
18
+ "source_note": "Microsoft LayoutLMv3"
19
+ },
20
+ "gguf_mirror": null,
21
+ "runtime": "transformers",
22
+ "modalities": [
23
+ "text",
24
+ "vision"
25
+ ],
26
+ "context_tokens": 512,
27
+ "total_params_b": 0.13,
28
+ "active_params_b": null,
29
+ "quantization": "fp32 safetensors",
30
+ "primary_artifact": "model.safetensors",
31
+ "package_state": "weights_mirrored",
32
+ "validation_status": "scaffold_verified",
33
+ "sovereignty_tier": 3,
34
+ "supports_tools": false,
35
+ "supports_json": true,
36
+ "audit_hash_chain": "SHA-256 over canonical request + response JSON",
37
+ "build_date_utc": "2026-05-17T01:55:23Z"
38
+ }
requirements.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ huggingface_hub>=0.27
2
+ numpy
3
+ torch>=2.4
4
+ transformers>=4.50
5
+ accelerate>=1.0
6
+ safetensors
7
+ sentencepiece
8
+ einops