1. Déploiement
  2. SGLang

Utilisez SGLang si vous voulez un serveur local compatible OpenAI et que votre stack préfère déjà ce runtime.

  • Installation pip

  • Image Docker

pip install sglang

python3 -m sglang.launch_server \
  --model-path "CohereLabs/North-Mini-Code-1.0" \
  --host 0.0.0.0 \
  --port 30000
curl -X POST "http://localhost:30000/v1/chat/completions" \
  -H "Content-Type: application/json" \
  --data '{
    "model": "CohereLabs/North-Mini-Code-1.0",
    "messages": [
      {
        "role": "user",
        "content": "Write a Python function that groups anagrams."
      }
    ],
    "temperature": 1.0,
    "top_p": 0.95
  }'

Le panneau de déploiement Hugging Face présente cette route comme un serveur compatible OpenAI sur le port 30000, ce qui facilite son remplacement dans les outils existants qui attendent déjà des chat completions.