Text Generation
Transformers
Safetensors
English
speech
duplex
voice-assistant
streaming
tool-calling
qwen
text-to-speech
Instructions to use sadmN/aiden-duplex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sadmN/aiden-duplex with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sadmN/aiden-duplex")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("sadmN/aiden-duplex", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sadmN/aiden-duplex with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sadmN/aiden-duplex" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sadmN/aiden-duplex", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sadmN/aiden-duplex
- SGLang
How to use sadmN/aiden-duplex with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "sadmN/aiden-duplex" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sadmN/aiden-duplex", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "sadmN/aiden-duplex" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sadmN/aiden-duplex", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sadmN/aiden-duplex with Docker Model Runner:
docker model run hf.co/sadmN/aiden-duplex
File size: 3,799 Bytes
61012f7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | #!/usr/bin/env bash
# Check a running Aiden server. Run it in a second terminal after starting run.sh:
# bash scripts/check_server.sh
# Optional: PORT=8999 HOST=0.0.0.0 bash scripts/check_server.sh
set -uo pipefail
ROOT=$(cd "$(dirname "$0")/.." && pwd)
HOST=${HOST:-127.0.0.1}
PORT=${PORT:-8998}
BASE="http://$HOST:$PORT"
FAIL=0
report() { printf '%-34s %s\n' "$1" "$2"; }
# 1. Is anything listening on the port?
if ss -lnt 2>/dev/null | grep -q ":$PORT "; then
report "listening on port $PORT" "PASS"
else
report "listening on port $PORT" "FAIL - server is not running (see the run.sh terminal)"
FAIL=1
fi
# 2. Health endpoint: ready means thinker + ASR + TTS workers are alive.
HEALTH=$(curl -fsS --max-time 5 "$BASE/health" 2>/dev/null)
case "$HEALTH" in
*'"ready": true'*|*'"ready":true'*)
report "health endpoint" "PASS ($HEALTH)" ;;
"")
report "health endpoint" "FAIL - no response from $BASE" ; FAIL=1 ;;
*)
report "health endpoint" "WAIT - still loading: $HEALTH" ; FAIL=1 ;;
esac
# 3. The demo page is served and contains the UI.
PAGE=$(mktemp)
CODE=$(curl -s -o "$PAGE" -w '%{http_code}' --max-time 5 "$BASE/" 2>/dev/null)
if [ "$CODE" = "200" ] && grep -q 'Enable mic' "$PAGE"; then
report "demo page" "PASS (HTTP 200)"
else
report "demo page" "FAIL (HTTP ${CODE:-none})"
FAIL=1
fi
rm -f "$PAGE"
# 4. GPU memory, for information only.
if command -v nvidia-smi >/dev/null 2>&1; then
report "GPU memory used" "$(nvidia-smi --query-gpu=memory.used,memory.total \
--format=csv,noheader 2>/dev/null | head -1)"
fi
# 5. One real turn over the same WebSocket the browser uses.
PY="$ROOT/.venv-thinker/bin/python"
[ -x "$PY" ] || PY=$(command -v python3 || true)
if [ -n "$PY" ]; then
if AIDEN_URL="ws://$HOST:$PORT/ws" "$PY" - <<'PY'
import asyncio, json, os, sys
import aiohttp
URL = os.environ['AIDEN_URL']
headers = {'Origin': os.environ['AIDEN_ORIGIN']} if os.environ.get('AIDEN_ORIGIN') else {}
async def main():
async with aiohttp.ClientSession() as s:
async with s.ws_connect(URL, headers=headers) as ws:
await ws.send_json({'type': 'text', 'text': 'look up the movie Obsession'})
tools, said = [], []
try:
while len(said) < 2:
m = await asyncio.wait_for(ws.receive(), 60)
if m.type != aiohttp.WSMsgType.TEXT:
continue
d = json.loads(m.data)
if d.get('type') == 'tool':
tools.append('%s %s' % (d.get('name'), d.get('stage')))
elif d.get('type') == 'audio':
said.append(d.get('text', ''))
await ws.send_json({'type': 'playing', 'seq': d['seq'],
'epoch': d['epoch']})
await ws.send_json({'type': 'played', 'seq': d['seq'],
'epoch': d['epoch']})
elif d.get('type') == 'error':
print('turn: FAIL - ' + str(d.get('message')))
return 1
except asyncio.TimeoutError:
print('turn: FAIL - no audio within 60 s')
return 1
print('turn: PASS - tools=%s' % (tools or ['none']))
print(' speech=%s' % (' '.join(said)[:120]))
return 0
sys.exit(asyncio.run(main()))
PY
then :; else FAIL=1; fi
else
report "one live turn" "SKIP - no python found"
fi
echo
if [ "$FAIL" = 0 ]; then
echo "RESULT: server is healthy. Open $BASE in a browser and click Enable mic."
else
echo "RESULT: not ready yet. Re-run this check in 30 s; if it still fails, read"
echo " the terminal where run.sh is running."
fi
exit "$FAIL"
|