Skip to main content

Fast and easy LLM serving.

Project description

mistral.rs

mistralrs is a Python package which provides an easy to use API for mistral.rs.

Example

More examples can be found here!

from mistralrs import Runner, Which, ChatCompletionRequest

runner = Runner(
    which=Which.Plain(
        model_id="microsoft/Phi-3.5-mini-instruct",
    ),
    in_situ_quant="Q4K",
)

res = runner.send_chat_completion_request(
    ChatCompletionRequest(
        model="mistral",
        messages=[
            {"role": "user", "content": "Tell me a story about the Rust type system."}
        ],
        max_tokens=256,
        presence_penalty=1.0,
        top_p=0.1,
        temperature=0.1,
    )
)
print(res.choices[0].message.content)
print(res.usage)

Please find API docs here and the type stubs here, which are another great form of documentation.

We also provide a cookbook here!

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

mistralrs_mkl-0.3.2-cp312-cp312-manylinux_2_34_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.34+ x86-64

mistralrs_mkl-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.34+ x86-64

mistralrs_mkl-0.3.2-cp310-cp310-manylinux_2_34_x86_64.whl (18.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.34+ x86-64

File details

Details for the file mistralrs_mkl-0.3.2-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mistralrs_mkl-0.3.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5be816b242be0c630a4ec5a3387a5597df4a005c49ca6a2ac4190721f1f1dddc
MD5 636fdc9643059eafdc9ff27e53094e45
BLAKE2b-256 5dadade049ba7eb0c220304571108e6fbab655f1c71a36150bf4edbddc5551f8

See more details on using hashes here.

File details

Details for the file mistralrs_mkl-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mistralrs_mkl-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1a17e1863566c611dbbd0aaa2b102fd4f535e42b878fdbfdbde845c6c0c44b27
MD5 8332940d0770c42950baab9b64f09a41
BLAKE2b-256 2212d7ee0f3903718e0ef9fb74ccd43537a907cc3ca8d1c4db736c990732a785

See more details on using hashes here.

File details

Details for the file mistralrs_mkl-0.3.2-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for mistralrs_mkl-0.3.2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 35227089ad60653a05ee5b4921f5b8034d4a63bb55f1020388968c81c7de9e8b
MD5 b8f2ef546c22986939cfa4e254a3f592
BLAKE2b-256 67ea369f13500861cfd01e56a3935b0ef30d41a9d6adf01b4e163475617a27ff

See more details on using hashes here.

Supported by

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