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
Download scripts/run_server.sh from sadmN/aiden-duplex: direct link, hf CLI and curl.
- Browser
- Download file 2.1 kB
-
https://huggingface.co/sadmN/aiden-duplex/resolve/main/scripts/run_server.sh
- Command line
-
hf download hf://sadmN/aiden-duplex/scripts/run_server.sh
-
curl -L -o run_server.sh https://huggingface.co/sadmN/aiden-duplex/resolve/main/scripts/run_server.sh
2.1 kB
| # Start the Aiden duplex server. Loopback by default; set PUBLIC_ORIGIN for a proxy. | |
| set -euo pipefail | |
| ROOT=$(cd "$(dirname "$0")/.." && pwd) | |
| CODE="$ROOT/code" | |
| HOST=${HOST:-127.0.0.1} | |
| PORT=${PORT:-8998} | |
| export AIDEN_BASE_MODEL=${AIDEN_BASE_MODEL:-"$ROOT/models/qwen3.5-4b"} | |
| export AIDEN_CKPT=${AIDEN_CKPT:-"$ROOT/checkpoints/stage2_final.pt"} | |
| export AIDEN_TTS_MODEL=${AIDEN_TTS_MODEL:-"$ROOT/models/qwen3-tts"} | |
| export AIDEN_ASR_MODEL=${AIDEN_ASR_MODEL:-"$ROOT/models/whisper"} | |
| MIMI=$(ls "$ROOT/models/mimi"/*.safetensors 2>/dev/null | head -1 || true) | |
| export AIDEN_MIMI=${AIDEN_MIMI:-$MIMI} | |
| export AIDEN_MOSHI_SRC=${AIDEN_MOSHI_SRC:-"$CODE/vendor/personaplex"} | |
| export PYTHONPATH="$CODE:$CODE/stage1:$CODE/duplex" | |
| export AIDEN_VOICE_PYTHON=${AIDEN_VOICE_PYTHON:-"$ROOT/.venv-voice/bin/python"} | |
| # Open by default: anyone who can reach HOST:PORT gets the page. | |
| # Set ACCESS_CODE_FILE=/path/to/code to require a code (the file is created with a | |
| # random code, 20+ chars, if it does not exist yet). | |
| # A file named tavily_key next to run.sh enables real web search without any | |
| # environment variable. No key ships in this zip; without one Aiden answers from | |
| # memory and the web_search tool is simply not offered. | |
| if [ -z "${TAVILY_KEY_FILE:-}" ] && [ -s "$ROOT/tavily_key" ]; then | |
| TAVILY_KEY_FILE="$ROOT/tavily_key" | |
| fi | |
| ARGS=(--host "$HOST" --port "$PORT" --voice-python "$AIDEN_VOICE_PYTHON") | |
| if [ -n "${ACCESS_CODE_FILE:-}" ]; then | |
| if [ ! -s "$ACCESS_CODE_FILE" ]; then | |
| python3 -c 'import secrets;print(secrets.token_urlsafe(18))' > "$ACCESS_CODE_FILE" | |
| chmod 600 "$ACCESS_CODE_FILE" | |
| fi | |
| ARGS+=(--access-code-file "$ACCESS_CODE_FILE") | |
| fi | |
| [ -n "${PUBLIC_ORIGIN:-}" ] && ARGS+=(--public-origin "$PUBLIC_ORIGIN") | |
| [ -n "${TAVILY_KEY_FILE:-}" ] && ARGS+=(--tavily-key-file "$TAVILY_KEY_FILE") | |
| [ -n "${AVATAR_ORIGIN:-}" ] && ARGS+=(--avatar-origin "$AVATAR_ORIGIN") | |
| echo "Aiden on http://$HOST:$PORT" | |
| if [ -n "${ACCESS_CODE_FILE:-}" ]; then | |
| echo "access code: $(cat "$ACCESS_CODE_FILE")" | |
| fi | |
| exec "$ROOT/.venv-thinker/bin/python" -u "$CODE/duplex/server.py" "${ARGS[@]}" | |