ywjung/eMLX

★ 0Forks 0GoGitHub ↗Compare

README

eMLX

eMLX는 vllm-mlx 전용 로컬 LLM 실행/운영 도구입니다.
Ollama 스타일의 사용성에 easy MLX / extended MLX / engineered MLX 철학을 결합해, 실행·운영·점검을 하나의 흐름으로 제공합니다.

핵심 특징

  • Go 기반 단일 바이너리 CLI + Web UI
  • macOS에서 emlx만 실행하면 menubar + background serve 자동 시작
  • 단일 인스턴스 동작(기존 emlx/menubar 프로세스 정리 후 재실행)
  • vllm-mlx 최적화 옵션 기본 활성화
    • continuous batching
    • prefix cache
    • paged cache
  • OpenAI 호환 API 제공
    • /v1/models
    • /v1/chat/completions
    • /v1/embeddings
    • /v1/responses

빠른 시작

make build
make install

모델 alias 등록:

emlx pull --backend-model mlx-community/Qwen2.5-7B-Instruct-4bit qwen:7b

서버 실행(기본: 7900, backend: 17900):

emlx serve --vmlx-model mlx-community/Qwen2.5-7B-Instruct-4bit

채팅 실행:

emlx run qwen:7b "안녕하세요, 테스트 응답 해줘"

Web UI

  • Dashboard: http://127.0.0.1:7900/
  • Chat Test: http://127.0.0.1:7900/chat
  • API Docs: http://127.0.0.1:7900/api-docs
  • Help: http://127.0.0.1:7900/help
  • OpenAPI JSON: http://127.0.0.1:7900/openapi.json
  • Metrics(Prometheus): http://127.0.0.1:7900/metrics

주요 명령어

  • emlx (macOS: menubar + auto serve)
  • emlx serve [--port 7900 --vmlx-port 17900 --vmlx-model <id>]
  • emlx menubar [--port 7900 --vmlx-model <id>]
  • emlx pull --backend-model <id> <alias>
  • emlx create <alias> [--from <backend-model>] [--file Modelfile]
  • emlx list
  • emlx model active|load|unload
  • emlx run <alias> <prompt>
  • emlx rm <alias> [--purge-cache]
  • emlx logs [-n 120] [-f]
  • emlx doctor [--json]
  • emlx config show
  • emlx config set <key> <value>

설정

기본 설정 파일: ~/.emlx/config.json

주요 환경변수:

  • EMLX_HOME
  • EMLX_VMLX_BIN
  • EMLX_VMLX_MODEL
  • EMLX_BACKEND_URL (기본: http://127.0.0.1:17900/v1)
  • EMLX_API_KEY (backend 인증)
  • EMLX_SERVER_API_KEY (eMLX API 인증)
  • EMLX_CORS_ALLOW_ORIGINS (comma-separated)

패키징 (macOS)

make package-pkg

노타라이즈:

export EMLX_DEV_ID_INSTALLER="Developer ID Installer: Your Name (TEAMID)"
export EMLX_NOTARY_PROFILE="notary-profile-name"
make package-notarize

점검/부하 테스트

go run ./tools/emlx_api_smoke -base http://127.0.0.1:7900
go run ./tools/emlx_loadtest -base http://127.0.0.1:7900 -workers 16 -duration 30s

License

Apache License 2.0 (LICENSE)

Contributors

ywjung

Issues