# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0

name                py-mlx-lm
version             0.31.3
revision            0
categories-append   llm science

license             MIT
maintainers         nomaintainer
platforms           {darwin any}
supported_archs     noarch

description         LLMs with MLX and the Hugging Face Hub

long_description    mlx-lm provides tools for running, fine-tuning, \
                    and quantizing large language models using Apple's \
                    MLX framework and the Hugging Face Hub. Requires \
                    Apple Silicon (M1/M2/M3+).

homepage            https://github.com/ml-explore/mlx-lm

python.rootname     mlx_lm

python.versions     310 311 312 313 314

checksums           rmd160  195826b5a068e7d8d18327e77c4f0be7187ea663 \
                    sha256  61eb0e3ba09444f77f874aff295401d7ccd20b39495cbbce0c782a15474ce733 \
                    size    304318

if {${name} ne ${subport}} {
    depends_run-append \
                    port:py${python.version}-mlx \
                    port:py${python.version}-numpy \
                    port:py${python.version}-transformers \
                    port:py${python.version}-sentencepiece \
                    port:py${python.version}-protobuf3 \
                    port:py${python.version}-yaml \
                    port:py${python.version}-jinja2
}
