mlx-bun library API
    Preparing search index...
    Index
    • Stop admission, cancel pending work, join every session, take, creation and load in flight, then release the speech gate. The host releases the weights. Idempotent (later calls return the same promise); with nothing in flight the release happens synchronously.

      Returns Promise<void>

    • The checkpoint this service leases, resolved once (as in main, a model downloaded later needs a restart); null when the host has none.

      Returns Promise<string | null>

    • Release the model now (GPU memory returns; the next request reloads). False while a take or session is using it, or when it is not loaded.

      Returns Promise<boolean>

    • Fit vocabulary terms into the prompt budget, ", "-joined in order, whole terms only.

      Parameters

      • encode: (text: string) => number[]
      • budget: number
      • base: string
      • terms: string[]

      Returns { prompt: string; usage: VocabularyUsage }