Spaces:
Running
Running
MaduRox commited on
Commit ·
ae650e1
1
Parent(s): 72148e6
feat: deploy Kalpana RIF O(1) Studio with Needle-in-a-Haystack benchmarks, layer architecture, and Swagger API
Browse files- index.html +83 -27
index.html
CHANGED
|
@@ -508,18 +508,32 @@ print(cache.layers[0].key_rif.re_state.shape)
|
|
| 508 |
</div>
|
| 509 |
</section>
|
| 510 |
|
| 511 |
-
|
| 512 |
<!-- TAB 4: SWAGGER / OPENAPI DOCUMENTATION -->
|
| 513 |
<!-- ============================================================ -->
|
| 514 |
<section class="tab-pane" id="tab-swagger">
|
| 515 |
<div class="pane-inner">
|
| 516 |
-
<div class="section-header">
|
| 517 |
-
<
|
| 518 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 519 |
</div>
|
| 520 |
|
| 521 |
-
<!--
|
| 522 |
-
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 523 |
<div class="endpoint-header" onclick="toggleSwagger(this)">
|
| 524 |
<span class="http-method method-post">POST</span>
|
| 525 |
<span class="endpoint-path">/v1/chat/completions</span>
|
|
@@ -528,24 +542,25 @@ print(cache.layers[0].key_rif.re_state.shape)
|
|
| 528 |
</div>
|
| 529 |
<div class="endpoint-body">
|
| 530 |
<p style="font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem;">
|
| 531 |
-
|
| 532 |
</p>
|
| 533 |
|
| 534 |
<div class="code-header">Example Request (cURL)</div>
|
| 535 |
<pre class="code-block"><code>curl -X POST https://madurox-kalpana-api-cpu.hf.space/v1/chat/completions \
|
| 536 |
-H "Content-Type: application/json" \
|
| 537 |
-d '{
|
| 538 |
-
"model": "
|
| 539 |
-
"messages": [
|
| 540 |
-
|
| 541 |
-
|
| 542 |
-
"
|
|
|
|
| 543 |
}'</code></pre>
|
| 544 |
</div>
|
| 545 |
</div>
|
| 546 |
|
| 547 |
-
<!-- Swagger Endpoint 2 -->
|
| 548 |
-
<div class="swagger-endpoint"
|
| 549 |
<div class="endpoint-header" onclick="toggleSwagger(this)">
|
| 550 |
<span class="http-method method-get">GET</span>
|
| 551 |
<span class="endpoint-path">/api/telemetry</span>
|
|
@@ -559,30 +574,71 @@ print(cache.layers[0].key_rif.re_state.shape)
|
|
| 559 |
"active_model": "Qwen/Qwen2.5-0.5B-Instruct",
|
| 560 |
"hidden_layers": 24,
|
| 561 |
"cache_type": "KalpanaDynamicCache",
|
| 562 |
-
"kalpana_kv_memory_mb":
|
| 563 |
-
"standard_kv_memory_mb":
|
| 564 |
-
"vram_compression_ratio": "
|
| 565 |
"patent_application": "LK/P/1/24089"
|
| 566 |
}</code></pre>
|
| 567 |
</div>
|
| 568 |
</div>
|
| 569 |
|
| 570 |
-
<!-- Swagger Endpoint 3 -->
|
| 571 |
-
<div class="swagger-endpoint"
|
| 572 |
<div class="endpoint-header" onclick="toggleSwagger(this)">
|
| 573 |
<span class="http-method method-post">POST</span>
|
| 574 |
-
<span class="endpoint-path">/
|
| 575 |
-
<span class="endpoint-summary">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 576 |
<span class="expand-icon">▼</span>
|
| 577 |
</div>
|
| 578 |
<div class="endpoint-body">
|
| 579 |
-
<div class="code-header">Example
|
| 580 |
-
<pre class="code-block"><code>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 581 |
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 586 |
</div>
|
| 587 |
</div>
|
| 588 |
</div>
|
|
|
|
| 508 |
</div>
|
| 509 |
</section>
|
| 510 |
|
| 511 |
+
<!-- ============================================================ -->
|
| 512 |
<!-- TAB 4: SWAGGER / OPENAPI DOCUMENTATION -->
|
| 513 |
<!-- ============================================================ -->
|
| 514 |
<section class="tab-pane" id="tab-swagger">
|
| 515 |
<div class="pane-inner">
|
| 516 |
+
<div class="section-header" style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;">
|
| 517 |
+
<div>
|
| 518 |
+
<h2>🔌 Developer OpenAPI / Swagger API Reference</h2>
|
| 519 |
+
<p>Standard OpenAI-compatible inference and telemetry endpoints powered by ZeroGPU (NVIDIA A100).</p>
|
| 520 |
+
</div>
|
| 521 |
+
<a href="https://madurox-kalpana-api-cpu.hf.space/docs" target="_blank" class="btn-primary" style="text-decoration: none; width: auto; padding: 0.6rem 1.2rem; display: inline-flex; align-items: center; gap: 0.5rem;">
|
| 522 |
+
<span>📖 Open Full Swagger UI (/docs) ↗️</span>
|
| 523 |
+
</a>
|
| 524 |
</div>
|
| 525 |
|
| 526 |
+
<!-- Base URL Banner -->
|
| 527 |
+
<div style="background: rgba(0, 240, 255, 0.05); border: 1px solid var(--border-cyan); border-radius: 8px; padding: 0.8rem 1.2rem; margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: center;">
|
| 528 |
+
<div>
|
| 529 |
+
<span style="color: var(--text-muted); font-size: 0.8rem;">HOSTED ZERO-GPU ENDPOINT:</span>
|
| 530 |
+
<span style="font-family: var(--font-mono); font-weight: 700; color: var(--cyan); margin-left: 0.5rem;">https://madurox-kalpana-api-cpu.hf.space</span>
|
| 531 |
+
</div>
|
| 532 |
+
<span class="status-tag tag-pass">ONLINE · ZERO-GPU (A100)</span>
|
| 533 |
+
</div>
|
| 534 |
+
|
| 535 |
+
<!-- Swagger Endpoint 1: Chat Completions -->
|
| 536 |
+
<div class="swagger-endpoint open">
|
| 537 |
<div class="endpoint-header" onclick="toggleSwagger(this)">
|
| 538 |
<span class="http-method method-post">POST</span>
|
| 539 |
<span class="endpoint-path">/v1/chat/completions</span>
|
|
|
|
| 542 |
</div>
|
| 543 |
<div class="endpoint-body">
|
| 544 |
<p style="font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem;">
|
| 545 |
+
Standard OpenAI-compatible endpoint. Executes autoregressive generation using <code>KalpanaDynamicCache</code> across all model hidden layers on ZeroGPU.
|
| 546 |
</p>
|
| 547 |
|
| 548 |
<div class="code-header">Example Request (cURL)</div>
|
| 549 |
<pre class="code-block"><code>curl -X POST https://madurox-kalpana-api-cpu.hf.space/v1/chat/completions \
|
| 550 |
-H "Content-Type: application/json" \
|
| 551 |
-d '{
|
| 552 |
+
"model": "kalpana-qwen2.5-0.5b",
|
| 553 |
+
"messages": [
|
| 554 |
+
{"role": "user", "content": "Explain O(1) holographic memory"}
|
| 555 |
+
],
|
| 556 |
+
"max_tokens": 512,
|
| 557 |
+
"temperature": 0.7
|
| 558 |
}'</code></pre>
|
| 559 |
</div>
|
| 560 |
</div>
|
| 561 |
|
| 562 |
+
<!-- Swagger Endpoint 2: Telemetry -->
|
| 563 |
+
<div class="swagger-endpoint">
|
| 564 |
<div class="endpoint-header" onclick="toggleSwagger(this)">
|
| 565 |
<span class="http-method method-get">GET</span>
|
| 566 |
<span class="endpoint-path">/api/telemetry</span>
|
|
|
|
| 574 |
"active_model": "Qwen/Qwen2.5-0.5B-Instruct",
|
| 575 |
"hidden_layers": 24,
|
| 576 |
"cache_type": "KalpanaDynamicCache",
|
| 577 |
+
"kalpana_kv_memory_mb": 6.00,
|
| 578 |
+
"standard_kv_memory_mb": 2637.00,
|
| 579 |
+
"vram_compression_ratio": "439.5x Reduction",
|
| 580 |
"patent_application": "LK/P/1/24089"
|
| 581 |
}</code></pre>
|
| 582 |
</div>
|
| 583 |
</div>
|
| 584 |
|
| 585 |
+
<!-- Swagger Endpoint 3: Knowledge Pack Compiler -->
|
| 586 |
+
<div class="swagger-endpoint">
|
| 587 |
<div class="endpoint-header" onclick="toggleSwagger(this)">
|
| 588 |
<span class="http-method method-post">POST</span>
|
| 589 |
+
<span class="endpoint-path">/v1/knowledge_packs/compile</span>
|
| 590 |
+
<span class="endpoint-summary">Compile massive documents (100K-3M tokens) into portable O(1) Knowledge Packs (.kp)</span>
|
| 591 |
+
<span class="expand-icon">▼</span>
|
| 592 |
+
</div>
|
| 593 |
+
<div class="endpoint-body">
|
| 594 |
+
<div class="code-header">Example Request (cURL)</div>
|
| 595 |
+
<pre class="code-block"><code>curl -X POST https://madurox-kalpana-api-cpu.hf.space/v1/knowledge_packs/compile \
|
| 596 |
+
-H "Content-Type: application/json" \
|
| 597 |
+
-d '{
|
| 598 |
+
"text": "Paste large document text or manual here...",
|
| 599 |
+
"bandwidth": 2048
|
| 600 |
+
}'</code></pre>
|
| 601 |
+
</div>
|
| 602 |
+
</div>
|
| 603 |
+
|
| 604 |
+
<!-- Swagger Endpoint 4: Models List -->
|
| 605 |
+
<div class="swagger-endpoint">
|
| 606 |
+
<div class="endpoint-header" onclick="toggleSwagger(this)">
|
| 607 |
+
<span class="http-method method-get">GET</span>
|
| 608 |
+
<span class="endpoint-path">/v1/models</span>
|
| 609 |
+
<span class="endpoint-summary">List supported local and remote LLM models</span>
|
| 610 |
<span class="expand-icon">▼</span>
|
| 611 |
</div>
|
| 612 |
<div class="endpoint-body">
|
| 613 |
+
<div class="code-header">Example Response (JSON)</div>
|
| 614 |
+
<pre class="code-block"><code>{
|
| 615 |
+
"object": "list",
|
| 616 |
+
"data": [
|
| 617 |
+
{"id": "kalpana-qwen2.5-0.5b", "object": "model", "owned_by": "kalpana-ai"},
|
| 618 |
+
{"id": "qwen2.5-72b", "object": "model", "owned_by": "qwen"},
|
| 619 |
+
{"id": "llama-3.1-8b", "object": "model", "owned_by": "meta"}
|
| 620 |
+
]
|
| 621 |
+
}</code></pre>
|
| 622 |
+
</div>
|
| 623 |
+
</div>
|
| 624 |
|
| 625 |
+
<!-- Swagger Endpoint 5: Health Check -->
|
| 626 |
+
<div class="swagger-endpoint">
|
| 627 |
+
<div class="endpoint-header" onclick="toggleSwagger(this)">
|
| 628 |
+
<span class="http-method method-get">GET</span>
|
| 629 |
+
<span class="endpoint-path">/health</span>
|
| 630 |
+
<span class="endpoint-summary">System health, active packs count, and hardware status</span>
|
| 631 |
+
<span class="expand-icon">▼</span>
|
| 632 |
+
</div>
|
| 633 |
+
<div class="endpoint-body">
|
| 634 |
+
<div class="code-header">Example Response (JSON)</div>
|
| 635 |
+
<pre class="code-block"><code>{
|
| 636 |
+
"status": "ok",
|
| 637 |
+
"engine": "Kalpanā RIF Engine",
|
| 638 |
+
"device": "ZeroGPU (NVIDIA A100)",
|
| 639 |
+
"active_packs": 0,
|
| 640 |
+
"version": "5.0.0"
|
| 641 |
+
}</code></pre>
|
| 642 |
</div>
|
| 643 |
</div>
|
| 644 |
</div>
|