Skip to main content

llama-index llms mlx integration

Project description

LlamaIndex Llms Integration: MLX

Overview


Integrate with MLX LLMs from the mlx-lm library

Installation


pip install llama-index-llms-mlx

Example


from llama_index.llms.mlx import MLXLLM

llm = MLXLLM(
    model_name="microsoft/phi-2",
    context_window=3900,
    max_new_tokens=256,
    generate_kwargs={"temp": 0.7, "top_p": 0.95},
)

response = llm.complete("What is the meaning of life?")
print(str(response))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_llms_mlx-0.5.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_llms_mlx-0.5.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_llms_mlx-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_llms_mlx-0.5.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_llms_mlx-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1903f2f6d3cc7929b2b5df611eafb7204a7081521a6db46d5288d4b22b55d8f2
MD5 e8c5f4629c5226b92bf38e1651492291
BLAKE2b-256 0312f57b64fcd3669110aee62eb15b3801657c0eefe4d48d0eef35143771dd81

See more details on using hashes here.

File details

Details for the file llama_index_llms_mlx-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_llms_mlx-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_llms_mlx-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d593bfcabedcf6a96213999ea07b3ba3886d63a0d3a02b5d561d26ed51f1142
MD5 6c7c70f6eea128334d7fc2b2aef0fa27
BLAKE2b-256 3086165d4b625c3410b3eb88f3074f5bccac6ac27a230e9fe052de05e381a1ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page