#!/usr/bin/env bash set -euo pipefail # 在 GPU 主机上,launch 时显式指定 device 用 cuda(不指定 Xinference 也会自动探测到 GPU) curl -X POST 'http://116.62.10.183:9997/v1/models' \ -H 'Content-Type: application/json' \ -d '{"model_uid":"bge-m3","model_name":"bge-m3","model_type":"embedding","device":"cuda:0"}' curl 'http://116.62.10.183:9997/v1/models' # 期望含 "bge-m3" 且 state=running curl -X POST 'http://116.62.10.183:9997/v1/embeddings' \ -H 'Content-Type: application/json' \ -d '{"model":"bge-m3","input":"这是一个测试文本"}' # 期望 1024 维向量