anthonym21 commited on
Commit
5bc8ca1
·
1 Parent(s): 9a30239

feat: rebuild Slipstream Lab as technical companion

Browse files

Replace the old landing-page-style demo with a CPU-first protocol lab focused on UCR exploration, conformance inspection, LangGraph snippets, and training guidance.

Files changed (4) hide show
  1. README.md +32 -29
  2. app.py +431 -523
  3. app_logic.py +228 -0
  4. requirements.txt +1 -2
README.md CHANGED
@@ -1,42 +1,45 @@
1
  ---
2
- title: Slipstream v3
3
- emoji:
4
- colorFrom: blue
5
- colorTo: purple
6
  sdk: gradio
7
- sdk_version: 5.12.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
11
- short_description: "Real-time semantic quantization for multi-agent AI"
12
  ---
13
 
14
- # Slipstream v3: Real-Time Semantic Quantization
15
 
16
- Type a natural language sentence and watch it get quantized into a factorized
17
- Force-Object wire message in real time. No API keys, no GPU.
18
 
19
- ## Features
20
 
21
- - **Quantize** -- type any sentence, see the TQT (Think-Quantize-Transmit) pipeline in action
22
- - **Encode** -- build wire messages manually from Force + Object dropdowns
23
- - **Decode** -- parse and inspect SLIP v3 wire messages
24
- - **UCR Explorer** -- browse all 45 core anchors with filtering
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  ## Resources
27
 
28
- - **GitHub**: [github.com/anthony-maio/slipcore](https://github.com/anthony-maio/slipcore)
29
- - **PyPI**: `pip install slipcore`
30
- - **Paper**: [doi.org/10.5281/zenodo.18063451](https://doi.org/10.5281/zenodo.18063451)
31
- - **SDK Guide**: [docs/sdk-guide.md](https://github.com/anthony-maio/slipcore/blob/master/docs/sdk-guide.md)
32
-
33
- ## Citation
34
-
35
- ```bibtex
36
- @misc{maio2025slipstream,
37
- title={Slipstream: Semantic Quantization for Efficient Multi-Agent Coordination},
38
- author={Maio, Anthony},
39
- year={2025},
40
- doi={10.5281/zenodo.18063451}
41
- }
42
- ```
 
1
  ---
2
+ title: Slipstream Lab
3
+ emoji: 🧭
4
+ colorFrom: yellow
5
+ colorTo: gray
6
  sdk: gradio
7
+ sdk_version: 6.5.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
11
+ short_description: "CPU-first technical companion for Slipstream 3.1.1"
12
  ---
13
 
14
+ # Slipstream Lab
15
 
16
+ Technical companion Space for Slipstream `3.1.1`.
 
17
 
18
+ This Space is intentionally different from [slipstream.making-minds.ai](https://slipstream.making-minds.ai):
19
 
20
+ - the website explains and promotes the release
21
+ - this Space helps engineers inspect the shipped protocol and adoption path
22
+
23
+ ## Tabs
24
+
25
+ - `Overview`: release metrics and links
26
+ - `UCR Explorer`: browse the 45 core anchors
27
+ - `Conformance Lab`: validate and parse real `SLIP v3` wires
28
+ - `LangGraph Starter`: copy-paste integration snippets
29
+ - `Dataset / Model`: understand when training is optional and when it helps
30
+
31
+ ## Runtime model
32
+
33
+ - CPU-first
34
+ - ZeroGPU-compatible
35
+ - no live model inference
36
+ - no training workflow
37
 
38
  ## Resources
39
 
40
+ - Website: [slipstream.making-minds.ai](https://slipstream.making-minds.ai)
41
+ - GitHub: [anthony-maio/slipcore](https://github.com/anthony-maio/slipcore)
42
+ - PyPI: [slipcore](https://pypi.org/project/slipcore/)
43
+ - Paper: [doi.org/10.5281/zenodo.18063451](https://doi.org/10.5281/zenodo.18063451)
44
+ - Dataset: [anthonym21/slipstream-tqt](https://huggingface.co/datasets/anthonym21/slipstream-tqt)
45
+ - Reference model: [anthonym21/slipstream-glm-z1-9b](https://huggingface.co/anthonym21/slipstream-glm-z1-9b)
 
 
 
 
 
 
 
 
 
app.py CHANGED
@@ -1,523 +1,431 @@
1
- """
2
- Slipstream v3: Real-Time Semantic Quantization Demo
3
- Interactive HuggingFace Space for multi-agent AI communication protocol.
4
- """
5
-
6
- import gradio as gr
7
-
8
- from slipcore import (
9
- KeywordQuantizer,
10
- create_base_ucr,
11
- format_fallback,
12
- format_slip,
13
- parse_slip,
14
- render_human,
15
- __version__,
16
- )
17
- from slipcore.quantizer import FORCE_KEYWORDS, OBJECT_KEYWORDS, _keyword_score
18
-
19
- # --------------------------------------------------------------------------
20
- # Shared state
21
- # --------------------------------------------------------------------------
22
-
23
- UCR = create_base_ucr()
24
- QUANTIZER = KeywordQuantizer()
25
-
26
- FORCES = [
27
- "Observe", "Inform", "Ask", "Request", "Propose", "Commit",
28
- "Eval", "Meta", "Accept", "Reject", "Error", "Fallback",
29
- ]
30
-
31
- OBJECTS = [
32
- "State", "Change", "Error", "Result", "Status", "Complete",
33
- "Blocked", "Progress", "Clarify", "Permission", "Resource",
34
- "Task", "Plan", "Review", "Help", "Cancel", "Priority",
35
- "Alternative", "Rollback", "Deadline", "Approve", "NeedsWork",
36
- "Ack", "Sync", "Handoff", "Escalate", "Abort", "Condition",
37
- "Defer", "Timeout", "Validation", "Generic",
38
- ]
39
-
40
- FORCE_DESCRIPTIONS = {
41
- "Observe": "Passively notice state, change, or error",
42
- "Inform": "Report information -- status, completion, blockage, progress",
43
- "Ask": "Seek information -- clarification, status, permission",
44
- "Request": "Direct action -- task, review, help, plan",
45
- "Propose": "Suggest something -- plan, change, alternative",
46
- "Commit": "Pledge to something -- task, deadline, resource",
47
- "Eval": "Judge work quality -- approve, needs work",
48
- "Meta": "Protocol-level -- acknowledge, sync, handoff, escalate",
49
- "Accept": "Agree to a proposal or request",
50
- "Reject": "Decline a proposal or request",
51
- "Error": "Report system error -- timeout, resource, permission",
52
- "Fallback": "Content too complex for standard quantization",
53
- }
54
-
55
- FORCE_COLORS = {
56
- "Observe": "#6366f1", # indigo
57
- "Inform": "#0ea5e9", # sky
58
- "Ask": "#f59e0b", # amber
59
- "Request": "#ef4444", # red
60
- "Propose": "#8b5cf6", # violet
61
- "Commit": "#22c55e", # green
62
- "Eval": "#14b8a6", # teal
63
- "Meta": "#64748b", # slate
64
- "Accept": "#10b981", # emerald
65
- "Reject": "#f43f5e", # rose
66
- "Error": "#dc2626", # red-600
67
- "Fallback": "#78716c", # stone
68
- }
69
-
70
-
71
- # --------------------------------------------------------------------------
72
- # Quantize tab logic
73
- # --------------------------------------------------------------------------
74
-
75
- def quantize_sentence(text: str, src: str, dst: str) -> str:
76
- """Quantize natural language into SLIP v3, showing the full TQT pipeline."""
77
- if not text.strip():
78
- return ""
79
-
80
- src = "".join(c for c in (src or "alice").strip() if c.isalnum())[:20] or "alice"
81
- dst = "".join(c for c in (dst or "bob").strip() if c.isalnum())[:20] or "bob"
82
-
83
- # Run quantizer
84
- result = QUANTIZER.quantize(text)
85
- force = result.force
86
- obj = result.obj
87
- confidence = result.confidence
88
-
89
- # Build wire
90
- if result.is_fallback:
91
- ref = QUANTIZER.fallback_store.store(text)
92
- wire = format_fallback(src, dst, ref)
93
- else:
94
- wire = format_slip(src, dst, force, obj)
95
-
96
- # Get canonical from UCR
97
- anchor = UCR.get_by_force_obj(force, obj)
98
- canonical = anchor.canonical if anchor else f"{force} {obj}"
99
-
100
- # Compute keyword match details for Force
101
- force_detail_rows = []
102
- for f_name, patterns in FORCE_KEYWORDS.items():
103
- score = _keyword_score(text, patterns)
104
- if score > 0:
105
- matched = [p for p in patterns if p.lower() in text.lower()]
106
- color = FORCE_COLORS.get(f_name, "#666")
107
- bar_width = int(score * 100)
108
- winner = " **<--**" if f_name == force else ""
109
- force_detail_rows.append(
110
- (score, f"| <span style='color:{color}'>`{f_name}`</span> | "
111
- f"{''.join(matched[:3])} | "
112
- f"<span style='display:inline-block;background:{color};width:{bar_width}px;height:12px;border-radius:3px'></span> "
113
- f"{score:.2f}{winner} |")
114
- )
115
- force_detail_rows.sort(key=lambda x: x[0], reverse=True)
116
-
117
- # Compute keyword match details for Object
118
- obj_detail_rows = []
119
- for o_name, patterns in OBJECT_KEYWORDS.items():
120
- score = _keyword_score(text, patterns)
121
- if score > 0:
122
- matched = [p for p in patterns if p.lower() in text.lower()]
123
- bar_width = int(score * 100)
124
- winner = " **<--**" if o_name == obj else ""
125
- obj_detail_rows.append(
126
- (score, f"| `{o_name}` | "
127
- f"{''.join(matched[:3])} | "
128
- f"<span style='display:inline-block;background:#6366f1;width:{bar_width}px;height:12px;border-radius:3px'></span> "
129
- f"{score:.2f}{winner} |")
130
- )
131
- obj_detail_rows.sort(key=lambda x: x[0], reverse=True)
132
-
133
- # Token comparison
134
- input_tokens = len(text.split())
135
- wire_tokens = len(wire.split())
136
- reduction = ((input_tokens - wire_tokens) / input_tokens * 100) if input_tokens > 0 else 0
137
-
138
- # Confidence color
139
- if confidence >= 0.6:
140
- conf_color = "#22c55e"
141
- conf_label = "High"
142
- elif confidence >= 0.3:
143
- conf_color = "#f59e0b"
144
- conf_label = "Medium"
145
- else:
146
- conf_color = "#ef4444"
147
- conf_label = "Low"
148
-
149
- force_color = FORCE_COLORS.get(force, "#666")
150
-
151
- # Build output
152
- out = []
153
-
154
- # Wire result (hero)
155
- out.append(f"### Wire Output")
156
- out.append(f"```")
157
- out.append(wire)
158
- out.append(f"```")
159
- out.append("")
160
-
161
- # Human-readable
162
- human = render_human(wire)
163
- out.append(f"> {human}")
164
- out.append("")
165
-
166
- # Confidence + token savings
167
- conf_bar_width = int(confidence * 200)
168
- out.append(f"| Metric | Value |")
169
- out.append(f"|--------|-------|")
170
- out.append(f"| Confidence | <span style='color:{conf_color}'>{conf_label}</span> ({confidence:.0%}) |")
171
- out.append(f"| Force | <span style='color:{force_color}'>{force}</span> |")
172
- out.append(f"| Object | {obj} |")
173
- out.append(f"| Canonical | \"{canonical}\" |")
174
- out.append(f"| Input tokens | ~{input_tokens} |")
175
- out.append(f"| Wire tokens | {wire_tokens} |")
176
- out.append(f"| Reduction | {reduction:.0f}% |")
177
- out.append("")
178
-
179
- # Stage 1: Force classification
180
- if force_detail_rows:
181
- out.append(f"<details><summary><b>Stage 1: Force Classification</b> -- matched {len(force_detail_rows)} forces</summary>")
182
- out.append("")
183
- out.append(f"| Force | Matched Keywords | Score |")
184
- out.append(f"|-------|-----------------|-------|")
185
- for _, row in force_detail_rows[:6]:
186
- out.append(row)
187
- out.append("")
188
- out.append(f"</details>")
189
- out.append("")
190
-
191
- # Stage 2: Object classification
192
- if obj_detail_rows:
193
- out.append(f"<details><summary><b>Stage 2: Object Classification</b> -- matched {len(obj_detail_rows)} objects</summary>")
194
- out.append("")
195
- out.append(f"| Object | Matched Keywords | Score |")
196
- out.append(f"|--------|-----------------|-------|")
197
- for _, row in obj_detail_rows[:6]:
198
- out.append(row)
199
- out.append("")
200
- out.append(f"</details>")
201
- out.append("")
202
-
203
- if result.is_fallback:
204
- out.append(f"*Fallback triggered: no keyword patterns matched with sufficient confidence. "
205
- f"Raw text stored out-of-band with ref pointer.*")
206
-
207
- return "\n".join(out)
208
-
209
-
210
- # --------------------------------------------------------------------------
211
- # Encode tab logic
212
- # --------------------------------------------------------------------------
213
-
214
- def encode_message(src: str, dst: str, force: str, obj: str, payload: str) -> str:
215
- if not src or not dst or not force or not obj:
216
- return "Fill in source, destination, Force, and Object."
217
-
218
- clean_src = "".join(c for c in src.strip() if c.isalnum())[:20] or "agent"
219
- clean_dst = "".join(c for c in dst.strip() if c.isalnum())[:20] or "other"
220
-
221
- parts = ["SLIP", "v3", clean_src, clean_dst, force, obj]
222
- if payload.strip():
223
- for token in payload.strip().split():
224
- clean = "".join(c for c in token if c.isalnum())
225
- if clean:
226
- parts.append(clean[:30])
227
-
228
- wire = " ".join(parts)
229
- human = render_human(wire)
230
-
231
- input_tokens = len(parts)
232
- json_equiv = f'{{"from":"{src}","to":"{dst}","action":"{force}","target":"{obj}","payload":"{payload}"}}'
233
- json_tokens = len(json_equiv.split()) + json_equiv.count('"') + json_equiv.count(':')
234
- reduction = ((json_tokens - input_tokens) / json_tokens) * 100 if json_tokens > 0 else 0
235
-
236
- return f"""```
237
- {wire}
238
- ```
239
-
240
- > {human}
241
-
242
- | Metric | SLIP v3 | JSON equivalent |
243
- |--------|---------|-----------------|
244
- | Tokens | **{input_tokens}** | ~{json_tokens} |
245
- | Reduction | **{reduction:.0f}%** | -- |
246
- """
247
-
248
-
249
- # --------------------------------------------------------------------------
250
- # Decode tab logic
251
- # --------------------------------------------------------------------------
252
-
253
- def decode_message(wire: str) -> str:
254
- if not wire.strip():
255
- return "Enter a SLIP v3 message to decode."
256
-
257
- try:
258
- msg = parse_slip(wire.strip())
259
- except Exception as e:
260
- return f"Parse error: {e}"
261
-
262
- anchor = UCR.get_by_force_obj(msg.force, msg.obj)
263
- canonical = anchor.canonical if anchor else "unknown"
264
- coords = f"({', '.join(str(c) for c in anchor.coords)})" if anchor else "--"
265
- force_desc = FORCE_DESCRIPTIONS.get(msg.force, "Unknown")
266
- human = render_human(msg)
267
-
268
- return f"""> {human}
269
-
270
- | Field | Value |
271
- |-------|-------|
272
- | Version | {msg.version} |
273
- | Source | `{msg.src}` |
274
- | Destination | `{msg.dst}` |
275
- | Force | **{msg.force}** -- {force_desc} |
276
- | Object | **{msg.obj}** |
277
- | Canonical | \"{canonical}\" |
278
- | Coords | `{coords}` |
279
- | Payload | {' '.join(msg.payload) if msg.payload else '--'} |
280
- | Fallback | {'`' + msg.fallback_ref + '`' if msg.fallback_ref else '--'} |
281
- """
282
-
283
-
284
- # --------------------------------------------------------------------------
285
- # UCR Explorer
286
- # --------------------------------------------------------------------------
287
-
288
- def build_ucr_table(force_filter: str) -> str:
289
- anchors = list(UCR.anchors.values())
290
- anchors.sort(key=lambda a: a.index)
291
-
292
- if force_filter and force_filter != "All":
293
- anchors = [a for a in anchors if a.force == force_filter]
294
-
295
- rows = []
296
- for a in anchors:
297
- color = FORCE_COLORS.get(a.force, "#666")
298
- coords = ", ".join(str(c) for c in a.coords)
299
- rows.append(
300
- f"| `{a.index:#06x}` | <span style='color:{color}'>{a.force}</span> | "
301
- f"{a.obj} | {a.canonical} | ({coords}) |"
302
- )
303
-
304
- header = f"**{len(anchors)} anchors** " + (f"(filtered: {force_filter})" if force_filter != "All" else "(all)")
305
-
306
- return f"""{header}
307
-
308
- | Index | Force | Object | Canonical | Coords |
309
- |-------|-------|--------|-----------|--------|
310
- {chr(10).join(rows)}
311
- """
312
-
313
-
314
- # --------------------------------------------------------------------------
315
- # Example sentences for the quantizer
316
- # --------------------------------------------------------------------------
317
-
318
- EXAMPLES = [
319
- ["Please review the pull request for the auth module", "dev", "reviewer"],
320
- ["The database migration is complete", "worker", "manager"],
321
- ["I am blocked waiting for API credentials", "backend", "devops"],
322
- ["I suggest we switch to Redis for the session store", "architect", "team"],
323
- ["LGTM, approved for merge", "reviewer", "dev"],
324
- ["Emergency: halt all production deployments now", "sre", "allAgents"],
325
- ["What do you mean by 'optimize the query'?", "junior", "senior"],
326
- ["I will handle the database migration this sprint", "dbAdmin", "pm"],
327
- ["The API call to the payment provider timed out after 30s", "gateway", "monitor"],
328
- ["Yes, but only if we add monitoring first", "lead", "architect"],
329
- ["Ping, are you still there?", "coordinator", "worker"],
330
- ["No, that approach will not scale to our traffic levels", "cto", "engineer"],
331
- ]
332
-
333
-
334
- # --------------------------------------------------------------------------
335
- # Build Gradio app
336
- # --------------------------------------------------------------------------
337
-
338
- with gr.Blocks(
339
- title="Slipstream v3",
340
- theme=gr.themes.Soft(),
341
- css="""
342
- .hero-wire { font-size: 1.3em; font-family: monospace; }
343
- footer { display: none !important; }
344
- """
345
- ) as demo:
346
-
347
- gr.Markdown("""
348
- # Slipstream v3
349
- ### Real-time semantic quantization for multi-agent AI coordination
350
-
351
- Type a natural language sentence and watch it get quantized into a
352
- factorized Force-Object wire message. No API keys, no GPU -- runs on
353
- the keyword classifier built into [slipcore](https://pypi.org/project/slipcore/).
354
-
355
- ---
356
- """)
357
-
358
- with gr.Tabs():
359
-
360
- # ---- Quantize tab (hero feature) ----
361
- with gr.TabItem("Quantize", id="quantize"):
362
- gr.Markdown("### Think -> Quantize -> Transmit")
363
- gr.Markdown("Enter what you want to say. The quantizer maps it to Force + Object.")
364
-
365
- with gr.Row():
366
- q_text = gr.Textbox(
367
- label="Natural language input",
368
- placeholder="Please review the pull request for the auth module",
369
- lines=2,
370
- scale=4,
371
- )
372
- with gr.Row():
373
- q_src = gr.Textbox(label="Source agent", value="alice", scale=1)
374
- q_dst = gr.Textbox(label="Destination agent", value="bob", scale=1)
375
- q_btn = gr.Button("Quantize", variant="primary", scale=1)
376
-
377
- q_output = gr.Markdown()
378
-
379
- q_btn.click(
380
- quantize_sentence,
381
- inputs=[q_text, q_src, q_dst],
382
- outputs=q_output,
383
- )
384
- q_text.submit(
385
- quantize_sentence,
386
- inputs=[q_text, q_src, q_dst],
387
- outputs=q_output,
388
- )
389
-
390
- gr.Markdown("#### Try these examples")
391
- gr.Examples(
392
- examples=EXAMPLES,
393
- inputs=[q_text, q_src, q_dst],
394
- outputs=q_output,
395
- fn=quantize_sentence,
396
- cache_examples=False,
397
- )
398
-
399
- # ---- Encode tab ----
400
- with gr.TabItem("Encode", id="encode"):
401
- gr.Markdown("### Manual encoder")
402
- gr.Markdown("Build a wire message by picking Force and Object directly.")
403
-
404
- with gr.Row():
405
- enc_src = gr.Textbox(label="Source", value="alice", scale=1)
406
- enc_dst = gr.Textbox(label="Destination", value="bob", scale=1)
407
-
408
- with gr.Row():
409
- enc_force = gr.Dropdown(
410
- choices=FORCES, label="Force", value="Request",
411
- info="Action verb", scale=1,
412
- )
413
- enc_obj = gr.Dropdown(
414
- choices=OBJECTS, label="Object", value="Review",
415
- info="Domain noun", scale=1,
416
- )
417
-
418
- enc_payload = gr.Textbox(label="Payload (optional)", placeholder="auth", value="auth")
419
- enc_btn = gr.Button("Encode", variant="primary")
420
- enc_output = gr.Markdown()
421
-
422
- enc_btn.click(
423
- encode_message,
424
- inputs=[enc_src, enc_dst, enc_force, enc_obj, enc_payload],
425
- outputs=enc_output,
426
- )
427
-
428
- # ---- Decode tab ----
429
- with gr.TabItem("Decode", id="decode"):
430
- gr.Markdown("### Wire format decoder")
431
- gr.Markdown("Paste a SLIP v3 message to inspect it.")
432
-
433
- dec_input = gr.Textbox(
434
- label="SLIP v3 message",
435
- value="SLIP v3 alice bob Request Review auth",
436
- placeholder="SLIP v3 src dst Force Object payload...",
437
- )
438
- dec_btn = gr.Button("Decode", variant="primary")
439
- dec_output = gr.Markdown()
440
-
441
- dec_btn.click(decode_message, inputs=dec_input, outputs=dec_output)
442
-
443
- # ---- UCR Explorer tab ----
444
- with gr.TabItem("UCR Explorer", id="ucr"):
445
- gr.Markdown("### Universal Concept Reference")
446
- gr.Markdown("The 45 core anchors that form the shared semantic vocabulary.")
447
-
448
- ucr_filter = gr.Dropdown(
449
- choices=["All"] + FORCES,
450
- value="All",
451
- label="Filter by Force",
452
- )
453
- ucr_table = gr.Markdown(value=build_ucr_table("All"))
454
-
455
- ucr_filter.change(build_ucr_table, inputs=ucr_filter, outputs=ucr_table)
456
-
457
- # ---- About tab ----
458
- with gr.TabItem("About", id="about"):
459
- gr.Markdown(f"""
460
- ### What is Slipstream?
461
-
462
- Slipstream is a protocol that performs **semantic quantization**: mapping free-form
463
- messages onto a shared Universal Concept Reference (UCR) and transmitting factorized
464
- intents (Force + Object) that identify structured actions.
465
-
466
- Instead of sending `"Could you please take a look at my pull request for the authentication module changes?"` (17 tokens),
467
- Slipstream transmits `SLIP v3 dev reviewer Request Review auth` (7 tokens).
468
-
469
- **82% token reduction** while preserving semantic fidelity.
470
-
471
- ### How the quantizer works
472
-
473
- The keyword quantizer runs in two stages:
474
-
475
- 1. **Force classification** -- match input against keyword patterns for each of the 12 Force tokens. Pick the highest-scoring Force.
476
- 2. **Object classification** -- match input against keyword patterns for each of the 31+ Object tokens. Pick the highest-scoring Object.
477
-
478
- If no pattern matches above the confidence threshold, the message falls back to `Fallback Generic` with a pointer reference to the original text stored out-of-band.
479
-
480
- For production use, swap in the embedding-based `SemanticQuantizer` from `slipcore_ml` (requires sentence-transformers).
481
-
482
- ---
483
-
484
- ### Resources
485
-
486
- | Resource | Link |
487
- |----------|------|
488
- | GitHub | [github.com/anthony-maio/slipcore](https://github.com/anthony-maio/slipcore) |
489
- | PyPI | `pip install slipcore` (v{__version__}) |
490
- | Paper | [doi.org/10.5281/zenodo.18063451](https://doi.org/10.5281/zenodo.18063451) |
491
- | SDK Guide | [docs/sdk-guide.md](https://github.com/anthony-maio/slipcore/blob/master/docs/sdk-guide.md) |
492
- | Model (LoRA) | [anthonym21/slipstream-glm-z1-9b](https://huggingface.co/anthonym21/slipstream-glm-z1-9b) |
493
- | Dataset | [anthonym21/slipstream-tqt](https://huggingface.co/datasets/anthonym21/slipstream-tqt) |
494
-
495
- ### Cost savings at scale
496
-
497
- | Deployment | Agents | Annual JSON cost | Annual SLIP cost | Savings |
498
- |------------|--------|------------------|------------------|---------|
499
- | Startup | 10 | $3,600 | $650 | $2,950 |
500
- | Scale-up | 50 | $180,000 | $32,400 | $147,600 |
501
- | Enterprise | 1,000 | $2,500,000 | $450,000 | $2,050,000 |
502
-
503
- ---
504
-
505
- **Citation:**
506
- ```bibtex
507
- @misc{{maio2025slipstream,
508
- title={{Slipstream: Semantic Quantization for Efficient Multi-Agent Coordination}},
509
- author={{Maio, Anthony}},
510
- year={{2025}},
511
- doi={{10.5281/zenodo.18063451}}
512
- }}
513
- ```
514
-
515
- Apache 2.0 License | [Anthony Maio](https://github.com/anthony-maio)
516
- """)
517
-
518
- gr.Markdown(f"<center><sub>slipcore v{__version__} | keyword quantizer | "
519
- f"[source](https://github.com/anthony-maio/slipcore/tree/master/hf-space)</sub></center>")
520
-
521
-
522
- if __name__ == "__main__":
523
- demo.launch()
 
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ import gradio as gr
6
+ from app_logic import (
7
+ analyze_wire,
8
+ build_ucr_rows,
9
+ get_langgraph_snippet,
10
+ get_overview_metrics,
11
+ get_resource_rows,
12
+ get_training_guidance,
13
+ load_example_wires,
14
+ )
15
+
16
+ TABLE_HEADERS = ["index", "force", "object", "canonical", "coords", "core", "state"]
17
+ SNIPPET_TOPICS = [
18
+ "Boundary Encode/Decode",
19
+ "Force:Object Router",
20
+ "Fallback-Aware Flow",
21
+ ]
22
+ GUIDANCE_TOPICS = [
23
+ "When should I train?",
24
+ "What does the dataset look like?",
25
+ "What model artifacts exist?",
26
+ "How should I evaluate first?",
27
+ ]
28
+
29
+ CUSTOM_CSS = """
30
+ :root {
31
+ --slip-bg: #111111;
32
+ --slip-surface: #1a1a1a;
33
+ --slip-line: rgba(255, 255, 255, 0.08);
34
+ --slip-text: #f4efe6;
35
+ --slip-muted: #c5b8a0;
36
+ --slip-accent: #d18d3b;
37
+ --slip-cool: #83c5be;
38
+ }
39
+
40
+ body, .gradio-container {
41
+ background:
42
+ radial-gradient(circle at top left, rgba(209, 141, 59, 0.14), transparent 28%),
43
+ radial-gradient(circle at top right, rgba(131, 197, 190, 0.12), transparent 22%),
44
+ var(--slip-bg);
45
+ color: var(--slip-text);
46
+ }
47
+
48
+ .gradio-container {
49
+ max-width: 1320px !important;
50
+ }
51
+
52
+ .hero-shell {
53
+ border: 1px solid var(--slip-line);
54
+ border-radius: 28px;
55
+ padding: 28px;
56
+ background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
57
+ box-shadow: 0 24px 80px rgba(0,0,0,0.24);
58
+ }
59
+
60
+ .hero-grid {
61
+ display: grid;
62
+ grid-template-columns: 1.2fr 0.8fr;
63
+ gap: 20px;
64
+ }
65
+
66
+ .eyebrow {
67
+ color: var(--slip-accent);
68
+ text-transform: uppercase;
69
+ letter-spacing: 0.12em;
70
+ font-size: 12px;
71
+ margin-bottom: 14px;
72
+ }
73
+
74
+ .hero-title {
75
+ font-size: 56px;
76
+ line-height: 0.95;
77
+ margin: 0 0 16px 0;
78
+ letter-spacing: -0.05em;
79
+ }
80
+
81
+ .hero-copy {
82
+ font-size: 17px;
83
+ line-height: 1.65;
84
+ color: var(--slip-muted);
85
+ }
86
+
87
+ .signal-card, .mini-card {
88
+ border: 1px solid var(--slip-line);
89
+ border-radius: 20px;
90
+ padding: 18px;
91
+ background: rgba(255,255,255,0.03);
92
+ }
93
+
94
+ .signal-label {
95
+ color: var(--slip-cool);
96
+ text-transform: uppercase;
97
+ letter-spacing: 0.10em;
98
+ font-size: 12px;
99
+ margin-bottom: 10px;
100
+ }
101
+
102
+ .signal-code {
103
+ background: rgba(255,255,255,0.04);
104
+ border: 1px solid rgba(255,255,255,0.08);
105
+ border-radius: 16px;
106
+ padding: 14px;
107
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
108
+ font-size: 13px;
109
+ line-height: 1.65;
110
+ color: var(--slip-text);
111
+ white-space: pre-wrap;
112
+ }
113
+
114
+ .stats-grid {
115
+ display: grid;
116
+ grid-template-columns: repeat(4, minmax(0, 1fr));
117
+ gap: 14px;
118
+ margin-top: 18px;
119
+ }
120
+
121
+ .stat-value {
122
+ font-size: 28px;
123
+ font-weight: 700;
124
+ }
125
+
126
+ .stat-label {
127
+ color: var(--slip-muted);
128
+ font-size: 13px;
129
+ margin-top: 6px;
130
+ }
131
+
132
+ .panel-copy {
133
+ color: var(--slip-muted);
134
+ line-height: 1.65;
135
+ }
136
+
137
+ @media (max-width: 960px) {
138
+ .hero-grid,
139
+ .stats-grid {
140
+ grid-template-columns: 1fr;
141
+ }
142
+
143
+ .hero-title {
144
+ font-size: 42px;
145
+ }
146
+ }
147
+ """
148
+
149
+
150
+ def _metrics_html() -> str:
151
+ cards = []
152
+ for item in get_overview_metrics():
153
+ cards.append(
154
+ f"""
155
+ <div class="mini-card">
156
+ <div class="stat-value">{item["value"]}</div>
157
+ <div class="stat-label">{item["metric"]}</div>
158
+ </div>
159
+ """
160
+ )
161
+ return "<div class='stats-grid'>" + "".join(cards) + "</div>"
162
+
163
+
164
+ def _resources_markdown() -> str:
165
+ rows = ["| Resource | Link |", "|---|---|"]
166
+ for item in get_resource_rows():
167
+ rows.append(f"| {item['resource']} | {item['link']} |")
168
+ return "\n".join(rows)
169
+
170
+
171
+ def _render_ucr(force_filter: str, search: str) -> tuple[str, list[list[str]]]:
172
+ rows = build_ucr_rows(force_filter=force_filter, search=search)
173
+ summary = (
174
+ f"Showing **{len(rows)}** anchors"
175
+ if rows
176
+ else "No anchors matched the current filter."
177
+ )
178
+ data = [[row[header] for header in TABLE_HEADERS] for row in rows]
179
+ return summary, data
180
+
181
+
182
+ def _render_analysis(wire: str) -> tuple[str, str, dict[str, Any], str]:
183
+ result = analyze_wire(wire)
184
+ if result["status"] == "valid":
185
+ status = "### Valid wire\nThis message passes Slipstream v3 validation."
186
+ issues = "No issues."
187
+ else:
188
+ status = "### Invalid wire\nThis message violates one or more Slipstream v3 invariants."
189
+ issues = "\n".join(f"- {issue}" for issue in result["issues"])
190
+ return status, issues, result["fields"], result["human"]
191
+
192
+
193
+ def _load_example(example_type: str, selected: str | None) -> str:
194
+ if selected:
195
+ return selected
196
+ examples = load_example_wires(example_type)
197
+ return examples[0] if examples else ""
198
+
199
+
200
+ def _example_choices(example_type: str) -> tuple[dict[str, Any], str]:
201
+ examples = load_example_wires(example_type)
202
+ value = examples[0] if examples else ""
203
+ return gr.update(choices=examples, value=value), value
204
+
205
+
206
+ def _render_snippet(topic: str) -> tuple[str, str]:
207
+ copy = {
208
+ "Boundary Encode/Decode": (
209
+ "Add Slipstream at the handoff boundary. "
210
+ "Keep your graph state and existing node logic intact."
211
+ ),
212
+ "Force:Object Router": (
213
+ "Route on `Force:Object` once the message is decoded. "
214
+ "This is the smallest useful production pattern."
215
+ ),
216
+ "Fallback-Aware Flow": (
217
+ "Let fallback handle the long tail first. "
218
+ "Only train later if the fallback rate is too high for your workload."
219
+ ),
220
+ }[topic]
221
+ return copy, get_langgraph_snippet(topic)
222
+
223
+
224
+ with gr.Blocks(title="Slipstream Lab") as demo:
225
+ gr.HTML(
226
+ """
227
+ <section class="hero-shell">
228
+ <div class="hero-grid">
229
+ <div>
230
+ <div class="eyebrow">Slipstream 3.1.1 · Hugging Face Technical Companion</div>
231
+ <h1 class="hero-title">Explore the protocol, not just the pitch.</h1>
232
+ <p class="hero-copy">
233
+ This Space is the technical counterpart to the static website.
234
+ It is designed for engineers evaluating Slipstream in real systems:
235
+ inspect UCR anchors, validate wire messages against the shipped invariants,
236
+ generate LangGraph integration snippets, and review the dataset/model path
237
+ without running live inference.
238
+ </p>
239
+ <p class="hero-copy">
240
+ It is CPU-first and ZeroGPU-compatible by design.
241
+ There is no mandatory GPU path and no large-model dependency in the app itself.
242
+ </p>
243
+ </div>
244
+ <div class="signal-card">
245
+ <div class="signal-label">Wire format</div>
246
+ <div class="signal-code">
247
+ SLIP v3 &lt;src&gt; &lt;dst&gt; &lt;Force&gt; &lt;Object&gt; [payload...]
248
+ </div>
249
+ <div class="signal-label" style="margin-top: 16px;">Example</div>
250
+ <div class="signal-code">SLIP v3 planner reviewer Request Review auth</div>
251
+ <div class="signal-label" style="margin-top: 16px;">Why it matters</div>
252
+ <div class="panel-copy">
253
+ Slipstream compresses routine coordination traffic into short, explicit
254
+ messages that are easier to route, validate, and reason about than
255
+ repeated JSON envelopes.
256
+ </div>
257
+ </div>
258
+ </div>
259
+ </section>
260
+ """
261
+ )
262
+
263
+ gr.HTML(_metrics_html())
264
+
265
+ with gr.Tabs():
266
+ with gr.TabItem("Overview"):
267
+ gr.Markdown(
268
+ """
269
+ ## What this Space is for
270
+
271
+ Use this Space when you want to inspect the released protocol,
272
+ validate concrete wire examples, or understand how Slipstream
273
+ fits into a LangGraph-style orchestration stack.
274
+
275
+ It does **not** try to be a second homepage and it does **not**
276
+ depend on live model inference.
277
+ """
278
+ )
279
+ gr.Markdown(_resources_markdown())
280
+
281
+ with gr.TabItem("UCR Explorer"):
282
+ gr.Markdown(
283
+ """
284
+ ## Universal Concept Reference
285
+
286
+ Browse the 45 core anchors that define the released
287
+ Slipstream 3.1.1 semantic surface. Filter by Force or search
288
+ across object names, canonical text, and coordinates.
289
+ """
290
+ )
291
+ with gr.Row():
292
+ force_filter = gr.Dropdown(
293
+ choices=["All"] + sorted({row["force"] for row in build_ucr_rows()}),
294
+ value="All",
295
+ label="Force filter",
296
+ )
297
+ search_box = gr.Textbox(
298
+ label="Search",
299
+ placeholder="review, timeout, handoff, 3 4 0 4",
300
+ )
301
+ ucr_summary = gr.Markdown()
302
+ ucr_table = gr.Dataframe(
303
+ headers=TABLE_HEADERS,
304
+ datatype=["str"] * len(TABLE_HEADERS),
305
+ interactive=False,
306
+ wrap=True,
307
+ )
308
+ for event in (force_filter.change, search_box.submit):
309
+ event(
310
+ _render_ucr,
311
+ inputs=[force_filter, search_box],
312
+ outputs=[ucr_summary, ucr_table],
313
+ )
314
+ demo.load(
315
+ _render_ucr,
316
+ inputs=[force_filter, search_box],
317
+ outputs=[ucr_summary, ucr_table],
318
+ )
319
+
320
+ with gr.TabItem("Conformance Lab"):
321
+ gr.Markdown(
322
+ """
323
+ ## Conformance Lab
324
+
325
+ Paste a `SLIP v3` wire message or load one of the shipped
326
+ conformance vectors. The validator below uses the library
327
+ implementation directly, so the results match the released
328
+ runtime behavior.
329
+ """
330
+ )
331
+ with gr.Row():
332
+ example_type = gr.Radio(
333
+ choices=["Valid", "Invalid"],
334
+ value="Valid",
335
+ label="Example set",
336
+ )
337
+ example_wire = gr.Dropdown(
338
+ choices=load_example_wires("Valid"),
339
+ value=load_example_wires("Valid")[0],
340
+ label="Conformance example",
341
+ )
342
+ wire_input = gr.Textbox(
343
+ label="Wire message",
344
+ lines=4,
345
+ value=load_example_wires("Valid")[0],
346
+ )
347
+ analyze_btn = gr.Button("Validate and parse", variant="primary")
348
+ status_md = gr.Markdown()
349
+ issues_md = gr.Markdown(label="Issues")
350
+ fields_json = gr.JSON(label="Parsed fields")
351
+ human_md = gr.Markdown(label="Human render")
352
+
353
+ example_type.change(
354
+ _example_choices,
355
+ inputs=example_type,
356
+ outputs=[example_wire, wire_input],
357
+ )
358
+ example_wire.change(
359
+ _load_example,
360
+ inputs=[example_type, example_wire],
361
+ outputs=wire_input,
362
+ )
363
+ analyze_btn.click(
364
+ _render_analysis,
365
+ inputs=wire_input,
366
+ outputs=[status_md, issues_md, fields_json, human_md],
367
+ )
368
+ demo.load(
369
+ _render_analysis,
370
+ inputs=wire_input,
371
+ outputs=[status_md, issues_md, fields_json, human_md],
372
+ )
373
+
374
+ with gr.TabItem("LangGraph Starter"):
375
+ gr.Markdown(
376
+ """
377
+ ## LangGraph Starter
378
+
379
+ These snippets are meant to be copied into your graph layer.
380
+ Start with boundary encode/decode and route on `Force:Object`.
381
+ Training is optional and should come only after you have
382
+ measured real traffic.
383
+ """
384
+ )
385
+ snippet_topic = gr.Dropdown(
386
+ choices=SNIPPET_TOPICS,
387
+ value=SNIPPET_TOPICS[0],
388
+ label="Pattern",
389
+ )
390
+ snippet_copy = gr.Markdown()
391
+ snippet_code = gr.Code(language="python", interactive=False)
392
+ snippet_topic.change(
393
+ _render_snippet,
394
+ inputs=snippet_topic,
395
+ outputs=[snippet_copy, snippet_code],
396
+ )
397
+ demo.load(
398
+ _render_snippet,
399
+ inputs=snippet_topic,
400
+ outputs=[snippet_copy, snippet_code],
401
+ )
402
+
403
+ with gr.TabItem("Dataset / Model"):
404
+ gr.Markdown(
405
+ """
406
+ ## Dataset and model path
407
+
408
+ Slipstream can be adopted without training. This tab is here to
409
+ clarify when training becomes useful, what the dataset contains,
410
+ and how to think about evaluation before you fine-tune anything.
411
+ """
412
+ )
413
+ guidance_topic = gr.Dropdown(
414
+ choices=GUIDANCE_TOPICS,
415
+ value=GUIDANCE_TOPICS[0],
416
+ label="Question",
417
+ )
418
+ guidance_md = gr.Markdown()
419
+ guidance_topic.change(get_training_guidance, inputs=guidance_topic, outputs=guidance_md)
420
+ demo.load(get_training_guidance, inputs=guidance_topic, outputs=guidance_md)
421
+
422
+
423
+ if __name__ == "__main__":
424
+ demo.launch(
425
+ theme=gr.themes.Base(
426
+ primary_hue="amber",
427
+ secondary_hue="stone",
428
+ neutral_hue="zinc",
429
+ ),
430
+ css=CUSTOM_CSS,
431
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app_logic.py ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ from functools import lru_cache
5
+ from pathlib import Path
6
+ from typing import Any
7
+
8
+ from slipcore import (
9
+ LangGraphSlipstreamAdapter,
10
+ create_base_ucr,
11
+ parse_slip,
12
+ render_human,
13
+ validate_wire,
14
+ )
15
+
16
+ ROOT = Path(__file__).resolve().parents[1]
17
+ VALID_VECTORS = ROOT / "spec" / "conformance" / "valid.jsonl"
18
+ INVALID_VECTORS = ROOT / "spec" / "conformance" / "invalid.jsonl"
19
+
20
+
21
+ @lru_cache(maxsize=1)
22
+ def _base_ucr():
23
+ return create_base_ucr()
24
+
25
+
26
+ @lru_cache(maxsize=1)
27
+ def _adapter() -> LangGraphSlipstreamAdapter:
28
+ return LangGraphSlipstreamAdapter()
29
+
30
+
31
+ def build_ucr_rows(force_filter: str = "All", search: str = "") -> list[dict[str, str]]:
32
+ query = search.strip().lower()
33
+ rows: list[dict[str, str]] = []
34
+
35
+ for anchor in sorted(_base_ucr(), key=lambda item: item.index):
36
+ if force_filter != "All" and anchor.force != force_filter:
37
+ continue
38
+
39
+ haystack = " ".join(
40
+ [
41
+ anchor.force,
42
+ anchor.obj,
43
+ anchor.canonical,
44
+ " ".join(str(value) for value in anchor.coords),
45
+ ]
46
+ ).lower()
47
+ if query and query not in haystack:
48
+ continue
49
+
50
+ rows.append(
51
+ {
52
+ "index": f"0x{anchor.index:04x}",
53
+ "force": anchor.force,
54
+ "object": anchor.obj,
55
+ "canonical": anchor.canonical,
56
+ "coords": str(anchor.coords),
57
+ "core": "yes" if anchor.is_core else "no",
58
+ "state": anchor.state.value,
59
+ }
60
+ )
61
+
62
+ return rows
63
+
64
+
65
+ def analyze_wire(wire: str) -> dict[str, Any]:
66
+ wire = wire.strip()
67
+ issues = validate_wire(wire)
68
+ if issues:
69
+ return {
70
+ "status": "invalid",
71
+ "issues": issues,
72
+ "human": "",
73
+ "fields": {},
74
+ }
75
+
76
+ message = parse_slip(wire)
77
+ fields = {
78
+ "version": message.version,
79
+ "src": message.src,
80
+ "dst": message.dst,
81
+ "force": message.force,
82
+ "object": message.obj,
83
+ "payload": " ".join(message.payload),
84
+ "fallback_ref": message.fallback_ref or "",
85
+ "token_count": str(message.token_count_estimate),
86
+ }
87
+
88
+ return {
89
+ "status": "valid",
90
+ "issues": [],
91
+ "human": render_human(message),
92
+ "fields": fields,
93
+ }
94
+
95
+
96
+ def load_example_wires(kind: str) -> list[str]:
97
+ path = VALID_VECTORS if kind == "Valid" else INVALID_VECTORS
98
+ examples: list[str] = []
99
+ with path.open(encoding="utf-8") as handle:
100
+ for line in handle:
101
+ record = json.loads(line)
102
+ examples.append(record["wire"])
103
+ if len(examples) == 8:
104
+ break
105
+ return examples
106
+
107
+
108
+ LANGGRAPH_SNIPPETS = {
109
+ "Boundary Encode/Decode": """from typing import TypedDict
110
+ from langgraph.graph import StateGraph
111
+
112
+ from slipcore import (
113
+ LangGraphSlipstreamAdapter,
114
+ make_decode_node,
115
+ make_encode_node,
116
+ )
117
+
118
+
119
+ class AgentState(TypedDict, total=False):
120
+ thought: str
121
+ src: str
122
+ dst: str
123
+ slip_wire: str
124
+ slip_force: str
125
+ slip_obj: str
126
+
127
+
128
+ adapter = LangGraphSlipstreamAdapter()
129
+ encode_node = make_encode_node(adapter)
130
+ decode_node = make_decode_node(adapter)
131
+
132
+ builder = StateGraph(AgentState)
133
+ builder.add_node("slip_encode", encode_node)
134
+ builder.add_node("slip_decode", decode_node)
135
+ """,
136
+ "Force:Object Router": """from slipcore import (
137
+ LangGraphSlipstreamAdapter,
138
+ make_force_object_router,
139
+ )
140
+
141
+ adapter = LangGraphSlipstreamAdapter()
142
+ route = make_force_object_router(adapter)
143
+
144
+ builder.add_conditional_edges(
145
+ "slip_decode",
146
+ route,
147
+ {
148
+ "Request:Review": "review_agent",
149
+ "Inform:Status": "status_agent",
150
+ "Fallback:Generic": "fallback_agent",
151
+ },
152
+ )
153
+ """,
154
+ "Fallback-Aware Flow": """from slipcore import LangGraphSlipstreamAdapter
155
+
156
+ adapter = LangGraphSlipstreamAdapter()
157
+
158
+ wire, result = adapter.encode_thought(
159
+ "Check kubernetes pod logs for OOMKilled events",
160
+ src="devops",
161
+ dst="sre",
162
+ )
163
+
164
+ decoded = adapter.decode_wire(wire)
165
+ print(decoded.message.force, decoded.message.obj)
166
+ print(decoded.fallback_text)
167
+ """,
168
+ }
169
+
170
+
171
+ def get_langgraph_snippet(topic: str) -> str:
172
+ return LANGGRAPH_SNIPPETS[topic]
173
+
174
+
175
+ TRAINING_GUIDANCE = {
176
+ "When should I train?": (
177
+ "Training is optional. Start with the built-in keyword quantizer, "
178
+ "strict wire validation, and pointer-based fallback. Measure "
179
+ "fallback rate and routing correctness first. Train only if your "
180
+ "workload needs higher intent recall than the rules-based path provides."
181
+ ),
182
+ "What does the dataset look like?": (
183
+ "The dataset is ShareGPT-style conversation data for Think -> "
184
+ "Quantize -> Transmit. Typical records include THOUGHT, QUANTIZE, "
185
+ "and SLIP lines so a model can learn the protocol without hiding "
186
+ "the reasoning step."
187
+ ),
188
+ "What model artifacts exist?": (
189
+ "Reference artifacts live on Hugging Face under the anthonym21 "
190
+ "namespace: the dataset `slipstream-tqt`, the LoRA adapter "
191
+ "`slipstream-glm-z1-9b`, and companion merged and GGUF variants."
192
+ ),
193
+ "How should I evaluate first?": (
194
+ "Build a small gold eval set from your own agent traffic. Track "
195
+ "Force accuracy, Object accuracy, fallback rate, and downstream "
196
+ "routing correctness before considering any fine-tuning pass."
197
+ ),
198
+ }
199
+
200
+
201
+ def get_training_guidance(topic: str) -> str:
202
+ return TRAINING_GUIDANCE[topic]
203
+
204
+
205
+ def get_overview_metrics() -> list[dict[str, str]]:
206
+ return [
207
+ {"metric": "Current release", "value": "3.1.1"},
208
+ {"metric": "Core dependencies", "value": "0"},
209
+ {"metric": "Passing tests", "value": "583"},
210
+ {"metric": "Average token reduction", "value": "82%"},
211
+ ]
212
+
213
+
214
+ def get_resource_rows() -> list[dict[str, str]]:
215
+ return [
216
+ {"resource": "Website", "link": "https://slipstream.making-minds.ai"},
217
+ {"resource": "GitHub", "link": "https://github.com/anthony-maio/slipcore"},
218
+ {"resource": "PyPI", "link": "https://pypi.org/project/slipcore/"},
219
+ {"resource": "Paper", "link": "https://doi.org/10.5281/zenodo.18063451"},
220
+ {
221
+ "resource": "Dataset",
222
+ "link": "https://huggingface.co/datasets/anthonym21/slipstream-tqt",
223
+ },
224
+ {
225
+ "resource": "Reference model",
226
+ "link": "https://huggingface.co/anthonym21/slipstream-glm-z1-9b",
227
+ },
228
+ ]
requirements.txt CHANGED
@@ -1,2 +1 @@
1
- gradio>=5.0.0
2
- slipcore>=3.0.1
 
1
+ slipcore>=3.1.1