From 194fa1d926497bec908ce54fbf1f51eec18b00bd Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Wed, 8 Jul 2026 17:38:00 +0200 Subject: [PATCH] Flatten QUICKSTART commands to single lines for easier copy-paste. Co-authored-by: Cursor --- QUICKSTART.md | 111 +++++++++----------------------------------------- 1 file changed, 19 insertions(+), 92 deletions(-) diff --git a/QUICKSTART.md b/QUICKSTART.md index 43040e0..fac8cd0 100644 --- a/QUICKSTART.md +++ b/QUICKSTART.md @@ -131,10 +131,7 @@ URL that nodes should use for outbound relay connections: .venv/bin/meshnet-relay --host 0.0.0.0 --port 8765 # Terminal 2 — tracker -.venv/bin/meshnet-tracker start \ - --host 0.0.0.0 \ - --port 8081 \ - --relay-url wss://ai.neuron.d-popov.com/ws +.venv/bin/meshnet-tracker start --host 0.0.0.0 --port 8081 --relay-url wss://ai.neuron.d-popov.com/ws ``` If this host sits behind Nginx Proxy Manager, point `/` and `/v1/*` at tracker @@ -249,9 +246,7 @@ meshnet-node start --tracker https://ai.neuron.d-popov.com --model Qwen/Qwen2.5- If the wrong entry point is shadowing, invoke via the full conda path: ```powershell -C:\Users\popov\miniforge3\Scripts\meshnet-node.exe start ` - --tracker https://ai.neuron.d-popov.com ` - --model Qwen/Qwen2.5-0.5B-Instruct +C:\Users\popov\miniforge3\Scripts\meshnet-node.exe start --tracker https://ai.neuron.d-popov.com --model Qwen/Qwen2.5-0.5B-Instruct ``` #### Option B — isolated virtualenv (fresh machine, no existing torch) @@ -297,12 +292,7 @@ Use the IPv4 address on the active Ethernet/Wi-Fi adapter, for example Administrator once: ```powershell -New-NetFirewallRule ` - -DisplayName "Meshnet node 8005" ` - -Direction Inbound ` - -Action Allow ` - -Protocol TCP ` - -LocalPort 8005 +New-NetFirewallRule -DisplayName "Meshnet node 8005" -Direction Inbound -Action Allow -Protocol TCP -LocalPort 8005 ``` 5. Start the Windows node from normal PowerShell. Replace the tracker and @@ -310,18 +300,10 @@ advertised host values with your actual LAN addresses: ```powershell $env:HF_HOME = "D:\DEV\models" - -.\.venv\Scripts\meshnet-node.exe start ` - --tracker http://192.168.0.179:8081 ` - --model Qwen/Qwen2.5-0.5B-Instruct ` - --shard-start 12 --shard-end 23 ` - --quantization bfloat16 ` - --host 0.0.0.0 ` - --advertise-host 192.168.0.42 ` - --port 8005 +.\.venv\Scripts\meshnet-node.exe start --tracker http://192.168.0.179:8081 --model Qwen/Qwen2.5-0.5B-Instruct --shard-start 12 --shard-end 23 --quantization bfloat16 --host 0.0.0.0 --advertise-host 192.168.0.42 --port 8005 ``` -One-line variants (direct LAN — node must be reachable by IP from other machines): +Other start examples (direct LAN — node must be reachable by IP from other machines): ```powershell .\.venv\Scripts\meshnet-node.exe start --tracker http://192.168.0.179:8081 --model Qwen/Qwen2.5-0.5B-Instruct --advertise-host 192.168.0.20 @@ -466,10 +448,7 @@ After NPM is correct, start relay and tracker on the LAN machine: .venv/bin/meshnet-relay --host 0.0.0.0 --port 8765 # Terminal 2 — tracker (advertises relay to nodes) -.venv/bin/meshnet-tracker start \ - --host 0.0.0.0 \ - --port 8081 \ - --relay-url wss://ai.neuron.d-popov.com/ws +.venv/bin/meshnet-tracker start --host 0.0.0.0 --port 8081 --relay-url wss://ai.neuron.d-popov.com/ws ``` Nodes using `https://ai.neuron.d-popov.com` should then log: @@ -491,9 +470,7 @@ opens a persistent outbound WebSocket. If the relay connection drops, the node keeps retrying it. ```bash -.venv/bin/meshnet-node start \ - --tracker https://ai.neuron.d-popov.com \ - --model Qwen/Qwen2.5-0.5B-Instruct +.venv/bin/meshnet-node start --tracker https://ai.neuron.d-popov.com --model Qwen/Qwen2.5-0.5B-Instruct ``` No authentication is required in the prototype. The first public node for a model @@ -555,16 +532,10 @@ In WSL2 (which gets a `172.x.x.x` virtual IP — unreachable from other machines ```bash # WSL2 Terminal 1 — head node (layers 0–11, handles chat requests) -.venv/bin/meshnet-node start \ - --tracker https://ai.neuron.d-popov.com \ - --model Qwen/Qwen2.5-0.5B-Instruct \ - --shard-start 0 --shard-end 11 +.venv/bin/meshnet-node start --tracker https://ai.neuron.d-popov.com --model Qwen/Qwen2.5-0.5B-Instruct --shard-start 0 --shard-end 11 # WSL2 Terminal 2 — tail node (layers 12–23) -.venv/bin/meshnet-node start \ - --tracker https://ai.neuron.d-popov.com \ - --model Qwen/Qwen2.5-0.5B-Instruct \ - --shard-start 12 --shard-end 23 +.venv/bin/meshnet-node start --tracker https://ai.neuron.d-popov.com --model Qwen/Qwen2.5-0.5B-Instruct --shard-start 12 --shard-end 23 ``` Both nodes connect to the relay automatically. When a chat request arrives at Node A, @@ -573,14 +544,7 @@ it forwards activations to Node B via `wss://ai.neuron.d-popov.com/rpc/{peer_id_ Send inference through the tracker (which picks the head node and injects the route): ```bash -curl -s https://ai.neuron.d-popov.com/v1/chat/completions \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer sk-mesh-" \ - -d '{ - "model": "Qwen/Qwen2.5-0.5B-Instruct", - "messages": [{"role": "user", "content": "What is 7 times 8?"}], - "stream": false - }' | python3 -m json.tool +curl -s https://ai.neuron.d-popov.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-mesh-" -d '{"model": "Qwen/Qwen2.5-0.5B-Instruct", "messages": [{"role": "user", "content": "What is 7 times 8?"}], "stream": false}' | python3 -m json.tool ``` Or send directly to Node A's local port (within WSL): @@ -608,24 +572,18 @@ refill during testing. ```bash # 1. Register (once) -curl -s https:///v1/auth/register \ - -H "Content-Type: application/json" \ - -d '{"email": "you@example.com", "password": "hunter22-or-better"}' +curl -s https:///v1/auth/register -H "Content-Type: application/json" -d '{"email": "you@example.com", "password": "hunter22-or-better"}' # → {"session_token": "...", ...} # 2. Create an API key (session token from step 1) -curl -s https:///v1/account/keys -X POST \ - -H "Authorization: Bearer " +curl -s https:///v1/account/keys -X POST -H "Authorization: Bearer " # → {"api_key": "sk-mesh-...", "caller_credit_granted": true} # 3. Check balance / usage curl -s https:///v1/account -H "Authorization: Bearer " # 4. (devnet trackers only) top up a key -curl -s https:///v1/account/topup -X POST \ - -H "Authorization: Bearer " \ - -H "Content-Type: application/json" \ - -d '{"api_key": "sk-mesh-..."}' +curl -s https:///v1/account/topup -X POST -H "Authorization: Bearer " -H "Content-Type: application/json" -d '{"api_key": "sk-mesh-..."}' ``` Operator side: both features default to 1 USDT (`--starting-credit` / @@ -661,12 +619,7 @@ Keep this terminal open. ```bash cd /run/media/popov/d/DEV/repos/d-popov.com/AI -HF_HOME=/run/media/popov/d/DEV/models \ -.venv/bin/meshnet-node start \ - --model Qwen/Qwen2.5-0.5B-Instruct \ - --quantization bfloat16 \ - --tracker http://localhost:8080 \ - --port 8001 +HF_HOME=/run/media/popov/d/DEV/models .venv/bin/meshnet-node start --model Qwen/Qwen2.5-0.5B-Instruct --quantization bfloat16 --tracker http://localhost:8080 --port 8001 ``` Shard range is **auto-detected** from the curated catalog (no network call for known @@ -708,13 +661,7 @@ If you started the node with `--port 8001`, send the request directly to that head node: ```bash Qwen2.5-0.5B-Instruct -curl -s http://localhost:8001/v1/chat/completions \ - -H "Content-Type: application/json" \ - -d '{ - "model": "qwen2.5-0.5b", - "messages": [{"role": "user", "content": "What is 7 times 8? Answer in one word."}], - "stream": false - }' | python3 -m json.tool +curl -s http://localhost:8001/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "qwen2.5-0.5b", "messages": [{"role": "user", "content": "What is 7 times 8? Answer in one word."}], "stream": false}' | python3 -m json.tool ``` If you did not pass `--port`, `meshnet-node start` uses the first free port at @@ -724,21 +671,13 @@ To test tracker routing/proxying, send the same OpenAI-compatible request to the tracker, using either the full HuggingFace repo or the quick alias: ```bash -curl -s http://localhost:8080/v1/chat/completions \ - -H "Content-Type: application/json" \ - -d '{ - "model": "qwen2.5-0.5b", - "messages": [{"role": "user", "content": "What is 7 times 8? Answer in one word."}], - "stream": false - }' | python3 -m json.tool +curl -s http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{"model": "qwen2.5-0.5b", "messages": [{"role": "user", "content": "What is 7 times 8? Answer in one word."}], "stream": false}' | python3 -m json.tool ``` Or use the test script: ```bash -.venv/bin/python scripts/test_lan_inference.py \ - --tracker http://localhost:8080 \ - --gateway http://localhost:8001 +.venv/bin/python scripts/test_lan_inference.py --tracker http://localhost:8080 --gateway http://localhost:8001 ``` --- @@ -749,24 +688,12 @@ Split Qwen2.5-0.5B's 24 layers across two node processes to test the sharded pip **Node A — layers 0–11 (tracker mode, serves chat completions):** ```bash -HF_HOME=/run/media/popov/d/DEV/models \ -.venv/bin/meshnet-node start \ - --model Qwen/Qwen2.5-0.5B-Instruct \ - --shard-start 0 --shard-end 11 \ - --quantization bfloat16 \ - --tracker http://localhost:8080 \ - --port 8001 +HF_HOME=/run/media/popov/d/DEV/models .venv/bin/meshnet-node start --model Qwen/Qwen2.5-0.5B-Instruct --shard-start 0 --shard-end 11 --quantization bfloat16 --tracker http://localhost:8080 --port 8001 ``` **Node B — layers 12–23:** ```bash -HF_HOME=/run/media/popov/d/DEV/models \ -.venv/bin/meshnet-node start \ - --model Qwen/Qwen2.5-0.5B-Instruct \ - --shard-start 12 --shard-end 23 \ - --quantization bfloat16 \ - --tracker http://localhost:8080 \ - --port 8002 +HF_HOME=/run/media/popov/d/DEV/models .venv/bin/meshnet-node start --model Qwen/Qwen2.5-0.5B-Instruct --shard-start 12 --shard-end 23 --quantization bfloat16 --tracker http://localhost:8080 --port 8002 ``` Send the request to Node A — it tokenizes, runs layers 0–11, passes binary