Skip to main content
LibreChat is joining ClickHouse to power the open-source Agentic Data Stack 🎉 Learn more
LibreChat

Apple MLX

Configura Apple MLX come endpoint personalizzato in LibreChat.

Apple MLX esegue i modelli localmente su Apple silicon tramite un'OpenAI-compatible API, così puoi puntare LibreChat alla tua macchina.

Configurazione

Il server MLX locale non autentica le richieste, quindi la API key è solo un segnaposto. Punta baseURL al tuo server in esecuzione. Aggiungi l'endpoint sotto endpoints.custom nel tuo librechat.yaml:

    - name: "MLX"
      apiKey: "mlx"
      baseURL: "http://localhost:8080/v1/" 
      models:
        default: [
          "Meta-Llama-3-8B-Instruct-4bit"
          ]
        fetch: false # fetching list of models is not supported
      titleConvo: true
      titleModel: "current_model"
      summarize: false
      summaryModel: "current_model"
      modelDisplayLabel: "Apple MLX"
      addParams:
            max_tokens: 2000
            "stop": [
              "<|eot_id|>"
            ]

Note

  • Il server MLX esegue un modello alla volta. Per servire più di un modello, esegui un'istanza separata su una porta diversa e aggiungi un altro endpoint con il proprio baseURL.
  • L'API è rigorosa riguardo ai parametri non riconosciuti, quindi mantieni addParams limitato ai valori accettati dal server, come max_tokens e stop.

Com’è questa guida?

In questa pagina