Document static showcase and Colab runtime
Browse files- README.md +6 -1
- demo/BarunAction_35M_Demo.ipynb +115 -0
README.md
CHANGED
|
@@ -21,7 +21,8 @@ tags:
|
|
| 21 |
|
| 22 |
### A 35M-parameter, proposal-only compiler for typed personal actions
|
| 23 |
|
| 24 |
-
[
|
|
|
|
| 25 |
[Source release](https://github.com/harrrshall/barunaction-35m/tree/v1.0.0) ·
|
| 26 |
[Artifact manifest](./MODEL_ARTIFACTS.json)
|
| 27 |
|
|
@@ -30,6 +31,10 @@ JSON context, and a timezone-aware reference time into strict **Action IR v1** J
|
|
| 30 |
**35,072,768 parameters** and is post-trained from
|
| 31 |
[`harrrshall/BarunLM-35M`](https://huggingface.co/harrrshall/BarunLM-35M).
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
> [!IMPORTANT]
|
| 34 |
> BarunAction produces proposals; it does not execute tools. The reference runtime verifies the
|
| 35 |
> checkpoint and output schema, returns `execution_permitted: false`, and has no calendar,
|
|
|
|
| 21 |
|
| 22 |
### A 35M-parameter, proposal-only compiler for typed personal actions
|
| 23 |
|
| 24 |
+
[Browse the interactive showcase](https://huggingface.co/spaces/harrrshall/BarunAction-35M) ·
|
| 25 |
+
[Run in Colab](https://colab.research.google.com/github/harrrshall/barunaction-35m/blob/main/examples/BarunAction_35M_Demo.ipynb) ·
|
| 26 |
[Source release](https://github.com/harrrshall/barunaction-35m/tree/v1.0.0) ·
|
| 27 |
[Artifact manifest](./MODEL_ARTIFACTS.json)
|
| 28 |
|
|
|
|
| 31 |
**35,072,768 parameters** and is post-trained from
|
| 32 |
[`harrrshall/BarunLM-35M`](https://huggingface.co/harrrshall/BarunLM-35M).
|
| 33 |
|
| 34 |
+
The hosted showcase contains six precomputed outputs generated and schema-verified locally with
|
| 35 |
+
this checkpoint; it is not hosted inference. Use the Colab notebook or local runtime to try an
|
| 36 |
+
arbitrary request.
|
| 37 |
+
|
| 38 |
> [!IMPORTANT]
|
| 39 |
> BarunAction produces proposals; it does not execute tools. The reference runtime verifies the
|
| 40 |
> checkpoint and output schema, returns `execution_permitted: false`, and has no calendar,
|
demo/BarunAction_35M_Demo.ipynb
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "markdown",
|
| 5 |
+
"metadata": {},
|
| 6 |
+
"source": [
|
| 7 |
+
"# BarunAction-35M: run a typed action locally\n",
|
| 8 |
+
"\n",
|
| 9 |
+
"This notebook installs the immutable `v1.0.0` runtime, anonymously downloads and hash-verifies the `candidate-v2` checkpoint, and compiles one request on the Colab CPU. The model only proposes typed Action IR: this notebook has no device integration and cannot execute the flashlight action."
|
| 10 |
+
]
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"cell_type": "code",
|
| 14 |
+
"execution_count": null,
|
| 15 |
+
"metadata": {},
|
| 16 |
+
"outputs": [],
|
| 17 |
+
"source": [
|
| 18 |
+
"!pip -q install \"barunaction-35m @ git+https://github.com/harrrshall/barunaction-35m.git@v1.0.0\""
|
| 19 |
+
]
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"cell_type": "markdown",
|
| 23 |
+
"metadata": {},
|
| 24 |
+
"source": [
|
| 25 |
+
"## Download the public checkpoint\n",
|
| 26 |
+
"\n",
|
| 27 |
+
"The downloader requests only the four release files from Hugging Face, uses anonymous access, and rejects any digest mismatch. The float checkpoint is approximately 141 MB."
|
| 28 |
+
]
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"cell_type": "code",
|
| 32 |
+
"execution_count": null,
|
| 33 |
+
"metadata": {},
|
| 34 |
+
"outputs": [],
|
| 35 |
+
"source": [
|
| 36 |
+
"import tempfile\n",
|
| 37 |
+
"from pathlib import Path\n",
|
| 38 |
+
"\n",
|
| 39 |
+
"from barunaction import BarunActionCompiler, download_candidate_checkpoint\n",
|
| 40 |
+
"\n",
|
| 41 |
+
"model_dir = Path(tempfile.mkdtemp(prefix=\"barunaction-demo-\")) / \"BarunAction-35M\"\n",
|
| 42 |
+
"downloaded = download_candidate_checkpoint(model_dir)\n",
|
| 43 |
+
"compiler = BarunActionCompiler(downloaded.path, device=\"cpu\")\n",
|
| 44 |
+
"print(f\"Verified checkpoint: {downloaded.path}\")"
|
| 45 |
+
]
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"cell_type": "markdown",
|
| 49 |
+
"metadata": {},
|
| 50 |
+
"source": [
|
| 51 |
+
"## Compile a request to Action IR\n",
|
| 52 |
+
"\n",
|
| 53 |
+
"The caller supplies the tool schema explicitly. `side_effecting: true` tells the deterministic policy layer to require external authorization and confirmation; it does **not** give the model permission to execute anything."
|
| 54 |
+
]
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"cell_type": "code",
|
| 58 |
+
"execution_count": null,
|
| 59 |
+
"metadata": {},
|
| 60 |
+
"outputs": [],
|
| 61 |
+
"source": [
|
| 62 |
+
"import json\n",
|
| 63 |
+
"\n",
|
| 64 |
+
"tools = [\n",
|
| 65 |
+
" {\n",
|
| 66 |
+
" \"name\": \"turn_on_flashlight\",\n",
|
| 67 |
+
" \"description\": \"Turn on the device flashlight.\",\n",
|
| 68 |
+
" \"arguments\": {},\n",
|
| 69 |
+
" \"required\": [],\n",
|
| 70 |
+
" \"additional_arguments\": False,\n",
|
| 71 |
+
" \"side_effecting\": True,\n",
|
| 72 |
+
" }\n",
|
| 73 |
+
"]\n",
|
| 74 |
+
"\n",
|
| 75 |
+
"result = compiler.infer(\n",
|
| 76 |
+
" request=\"Turn on the flashlight\",\n",
|
| 77 |
+
" tool_schemas=tools,\n",
|
| 78 |
+
" context={},\n",
|
| 79 |
+
" now=\"2026-08-05T11:30:00+05:30\",\n",
|
| 80 |
+
")\n",
|
| 81 |
+
"print(json.dumps(result.to_dict(), indent=2, ensure_ascii=False))\n",
|
| 82 |
+
"\n",
|
| 83 |
+
"assert result.ok\n",
|
| 84 |
+
"assert result.policy is not None\n",
|
| 85 |
+
"assert result.policy.execution_permitted is False"
|
| 86 |
+
]
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
"cell_type": "markdown",
|
| 90 |
+
"metadata": {},
|
| 91 |
+
"source": [
|
| 92 |
+
"## Safety boundary\n",
|
| 93 |
+
"\n",
|
| 94 |
+
"A valid Action IR object is a proposal, not authorization. A real product must separately authenticate the user, check permissions, request confirmation when appropriate, apply rate limits, and implement the external tool. BarunAction deliberately implements none of those side-effect paths."
|
| 95 |
+
]
|
| 96 |
+
}
|
| 97 |
+
],
|
| 98 |
+
"metadata": {
|
| 99 |
+
"colab": {
|
| 100 |
+
"name": "BarunAction-35M Demo",
|
| 101 |
+
"provenance": []
|
| 102 |
+
},
|
| 103 |
+
"kernelspec": {
|
| 104 |
+
"display_name": "Python 3",
|
| 105 |
+
"language": "python",
|
| 106 |
+
"name": "python3"
|
| 107 |
+
},
|
| 108 |
+
"language_info": {
|
| 109 |
+
"name": "python",
|
| 110 |
+
"version": "3"
|
| 111 |
+
}
|
| 112 |
+
},
|
| 113 |
+
"nbformat": 4,
|
| 114 |
+
"nbformat_minor": 5
|
| 115 |
+
}
|