Skip to content

Commit afab52b

Browse files
committed
Merge branch 'main' into pipeline_refactored
2 parents 5e899c9 + 7d23e79 commit afab52b

36 files changed

Lines changed: 1433 additions & 288 deletions

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
| [**Arxiv**](https://arxiv.org/pdf/2509.26182v1)
3030

3131
## News
32+
- [2026/2] 🦞 Parallax now supports OpenClaw integration! See [Docs](./docs/user_guide/work_with_openclaw.md)
3233
- [2025/10] 🔥 Parallax won #1 Product of The Day on Product Hunt!
3334
- [2025/10] 🔥 Parallax version 0.0.1 has been released!
3435

@@ -51,6 +52,7 @@ The backend architecture:
5152

5253
- [Installation](./docs/user_guide/install.md)
5354
- [Getting Started](./docs/user_guide/quick_start.md)
55+
- [Working with OpenClaw 🦞](./docs/user_guide/work_with_openclaw.md)
5456

5557
## Contributing
5658

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
## Work with OpenClaw 🦞
2+
3+
### What is OpenClaw 🦞?
4+
5+
[OpenClaw](https://openclaw.ai/) is an open-source personal AI assistant that runs on your own machine. Unlike cloud-based AI services, OpenClaw gives you full control over your data and infrastructure.
6+
7+
Key features include:
8+
9+
- **Multi-platform chat integration**: Interact via WhatsApp, Telegram, Discord, Slack, Signal, or iMessage
10+
- **Persistent memory**: Remembers your preferences and context across sessions
11+
- **Full system access**: Read/write files, run shell commands, and control your browser
12+
- **Extensible skills**: Use community-built skills or create your own
13+
- **Model flexibility**: Works with Anthropic, OpenAI, or local models
14+
15+
Github repo of OpenClaw: https://github.com/openclaw/openclaw
16+
17+
### Prerequisites
18+
19+
To integrate Parallax with OpenClaw, you need to meet the prerequisites for both projects:
20+
21+
- **Node.js**: >= 22 (required by OpenClaw)
22+
- **Python**: >=3.11 (required by Parallax)
23+
24+
Before proceeding, we assume you have already deployed Parallax on your AI cluster. For deployment instructions, please refer to:
25+
26+
- [Installation (Parallax)](./install.md)
27+
- [Quick Start (Parallax)](./quick_start.md)
28+
29+
30+
### Start your Parallax Service
31+
32+
**Step 1: Start the Scheduler**
33+
34+
On your scheduler machine, run:
35+
36+
```bash
37+
parallax run --host 0.0.0.0
38+
```
39+
40+
**Step 2: Select Model**
41+
42+
Open your browser and navigate to `localhost:3001` on the scheduler machine. Select your model and click **Continue**.
43+
44+
**Step 3: Start Edge Nodes**
45+
46+
On your edge nodes, run:
47+
48+
```bash
49+
parallax join --max-sequence-length 65536 --max-num-tokens-per-batch 65536 --enable-prefix-cache
50+
```
51+
52+
**Step 4: Test the Model**
53+
54+
On the scheduler machine, open your browser and navigate to `localhost:3001`. Use the chat interface to test if the model is working properly.
55+
56+
### Onboard OpenClaw
57+
58+
**Step 1: Install OpenClaw**
59+
60+
Use the official install script to install OpenClaw, skipping the onboard wizard:
61+
62+
```bash
63+
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
64+
```
65+
66+
**Step 2: Create Configuration File**
67+
68+
Create the configuration file at `~/.openclaw/openclaw.json` with the following content:
69+
70+
```json
71+
{
72+
"agents": {
73+
"defaults": {
74+
"model": {
75+
"primary": "parallax/your-model-name"
76+
}
77+
}
78+
},
79+
"models": {
80+
"providers": {
81+
"parallax": {
82+
"baseUrl": "http://localhost:3001/v1",
83+
"apiKey": "placeholder",
84+
"api": "openai-completions",
85+
"models": [
86+
{
87+
"id": "your-model-name",
88+
"name": "Parallax Model"
89+
}
90+
]
91+
}
92+
}
93+
}
94+
}
95+
```
96+
97+
**Step 3: Run Onboard**
98+
99+
```bash
100+
openclaw onboard --install-daemon
101+
```
102+
103+
During the onboard process:
104+
105+
1. Read and accept the OpenClaw risk disclaimer
106+
2. When prompted for **onboarding mode**, select `Quick Start`
107+
3. When prompted for **config handling**, select `Use existing values`
108+
4. When prompted for **Model/auth provider**, select `Skip for now`
109+
5. When prompted for **Filter models by provider**, select `All providers`
110+
6. When prompted for **Default model**, select `Keep current (parallax/your-model-name)`
111+
7. When prompted for **Select channel**, configure the channel based on your needs, or select `Skip for now`
112+
8. When prompted for **Select skills**, configure the skills based on your needs, or select `Skip for now`
113+
9. When prompted for **Enable hooks**, configure the hooks based on your needs, or select `Skip for now`
114+
10. Wait a moment for Gateway services being installed.
115+
11. When prompted for **How do you want to hatch your bot**, configure the way you hatch your bot based on your needs.
116+
117+
### Try on Browser
118+
119+
Open your browser and navigate to http://127.0.0.1:18789/. Start sending messages to OpenClaw and enjoy!
120+
121+
### Q&A
122+
123+
**Q: OOM Error**
124+
125+
```
126+
libc++abi: terminating due to uncaught exception of type std::runtime_error: [METAL] Command buffer execution failed: Insufficient Memory (00000008:kIOGPUCommandBufferCallbackErrorOutOfMemory)
127+
```
128+
129+
**A:** Add the `--kv-cache-memory-fraction` parameter when starting Parallax on edge nodes:
130+
131+
```bash
132+
parallax join --max-sequence-length 65536 --max-num-tokens-per-batch 65536 --enable-prefix-cache --kv-cache-memory-fraction 0.5
133+
```
134+
135+
If OOM errors persist, try using a smaller value for `--kv-cache-memory-fraction`.

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies = [
3333
"pydantic",
3434
"protobuf==6.31.1",
3535
"dijkstar==2.6.0",
36-
"lattica==1.0.19",
36+
"lattica==1.0.21",
3737
"orjson",
3838
]
3939

@@ -43,9 +43,10 @@ parallax = "parallax.cli:main"
4343
[project.optional-dependencies]
4444

4545
mac = [
46+
"nanobind==2.10.2",
4647
"torch==2.8.0",
47-
"mlx-lm==0.30.0",
48-
"mlx==0.30.1",
48+
"mlx-lm==0.30.5",
49+
"mlx==0.30.4",
4950
]
5051

5152
gpu = [

src/backend/benchmark/backend_request_func.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import aiohttp
1414
import huggingface_hub.constants
15-
from modelscope import snapshot_download
15+
from huggingface_hub import snapshot_download
1616
from tqdm.asyncio import tqdm
1717
from transformers import AutoTokenizer, PreTrainedTokenizer, PreTrainedTokenizerFast
1818

@@ -269,9 +269,9 @@ async def async_request_openai_chat_completions(
269269
def get_model(pretrained_model_name_or_path: str) -> str:
270270

271271
model_path = snapshot_download(
272-
model_id=pretrained_model_name_or_path,
272+
repo_id=pretrained_model_name_or_path,
273273
local_files_only=huggingface_hub.constants.HF_HUB_OFFLINE,
274-
ignore_file_pattern=[".*.pt", ".*.safetensors", ".*.bin"],
274+
ignore_patterns=[".*.pt", ".*.safetensors", ".*.bin"],
275275
)
276276
return model_path
277277

0 commit comments

Comments
 (0)