Skip to content

Automation foundation model for tiny devices: 2-bit, 8-29 MB, tool calls, ASR, structured extraction and embeddings on phones, wearables, smart homes, robots, cars and microcontrollers.

Needle 3 Live

HenryNdubuakudd857748ef4d
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 156724e..6b77d2d 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -78,7 +78,14 @@ jobs:
# PyPI ahead of the tags; the next version follows whichever is newer.
published=$(curl -sf https://pypi.org/pypi/cactus-needle/json | python3 -c 'import json,sys; print(json.loads(sys.stdin.read(), strict=False)["info"]["version"])' || true)
current=$(printf '%s\n%s\n' "${last#v}" "$published" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)
- echo "next=$(echo "$current" | awk -F. '{printf "%d.%d.%d", $1, $2, $3 + 1}')" >> "$GITHUB_OUTPUT"
+ # A version in pyproject.toml above everything published is a deliberate
+ # bump (a new major or minor): release exactly that, otherwise step the patch.
+ declared=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)
+ if [ "$(printf '%s\n%s\n' "$current" "$declared" | sort -V | tail -1)" = "$declared" ] && [ "$declared" != "$current" ]; then
+ echo "next=$declared" >> "$GITHUB_OUTPUT"
+ else
+ echo "next=$(echo "$current" | awk -F. '{printf "%d.%d.%d", $1, $2, $3 + 1}')" >> "$GITHUB_OUTPUT"
+ fi
- if: steps.version.outputs.skip != 'true'
run: |
next="${{ steps.version.outputs.next }}"
diff --git a/README.md b/README.md
index d0da12c..3119dd8 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,5 @@
![Needle](assets/banner.svg)
-[![Try it in the browser](https://img.shields.io/badge/Try%20it%20in%20the%20browser-cactuscompute.com%2Fneedle-e8593d?style=flat-square)](https://cactuscompute.com/needle)
-[![Hugging Face](https://img.shields.io/badge/Hugging%20Face-Cactus--Compute%2Fneedle3-ffd21e?style=flat-square&logo=huggingface&logoColor=000)](https://huggingface.co/Cactus-Compute/needle3)
-[![GitHub](https://img.shields.io/badge/GitHub-cactus--compute%2Fneedle-181717?style=flat-square&logo=github)](https://github.com/cactus-compute/needle)
-
-# Needle
-
A foundation model for mobiles, wearables, robots, smart home, automotive and microcontrollers. The whole model is a single 8-29 MB binary built on our Simple Attention Network, and we trade general chat capacity to beat models 10x its size on mobile tool calls and match 2-3x bigger models on extraction.
- **Tool calls**: given the functions your app exposes, Needle picks the right ones and fills every argument from what the user said. Ask for two things and you get two calls in order; ask for something no tool covers and you get an empty list, not a guess.
@@ -30,6 +24,8 @@ The interactive frontier plot, the architecture and the fine-tuning results are
pip install cactus-needle
```
+Try it in the browser at [cactuscompute.com/needle](https://cactuscompute.com/needle); the weights and every platform engine are on [Hugging Face](https://huggingface.co/Cactus-Compute/needle3).
+
Decorate a function: the signature gives the argument types, the docstring is the tool description, and `run()` completes the loop, executing your function and returning its results.
```python
diff --git a/needle/__init__.py b/needle/__init__.py
index 2b8555c..cc58066 100644
--- a/needle/__init__.py
+++ b/needle/__init__.py
@@ -12,7 +12,7 @@ from .agent.tools import Field, build_schema, pydantic_schema, tool, _is_pydanti
from ._telemetry import track as _track
from ._worker import FineTuneWorker
-__version__ = "2.0.12"
+__version__ = "3.0.0"
__all__ = ["Needle", "ExtractionValidationError", "tool", "Field", "extract",
"__version__"]
diff --git a/pyproject.toml b/pyproject.toml
index 47a8c0a..ec0a709 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "cactus-needle"
-version = "2.0.12"
+version = "3.0.0"
description = "A 14MB foundation tool-calling model for tiny devices: inference, LoRA finetuning, and build."
requires-python = ">=3.9"
readme = "README.md"
diff --git a/tests/test_release.py b/tests/test_release.py
index 2eff506..e87697f 100644
--- a/tests/test_release.py
+++ b/tests/test_release.py
@@ -106,3 +106,15 @@ def test_tag_step_tolerates_already_versioned_files(repo):
run_block(repo, tag_block("2.0.13"))
assert git(repo, "rev-parse", "v2.0.13^{commit}") == head
assert version_output(repo, published="2.0.13") == "skip=true"
+
+
+def test_declared_version_above_everything_published_is_released_as_is(repo):
+ git(repo, "tag", "v2.0.15")
+ (repo / "pyproject.toml").write_text('version = "3.0.0"\n')
+ (repo / "needle/__init__.py").write_text('__version__ = "3.0.0"\n')
+ git(repo, "commit", "-am", "Needle 3")
+
+ assert version_output(repo, published="2.0.15") == "next=3.0.0"
+
+ run_block(repo, tag_block("3.0.0"))
+ assert version_output(repo, published="3.0.0") == "skip=true"