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

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

mistralrs_cuda-0.4.0-cp312-none-win_amd64.whl (18.1 MB view details)

Uploaded CPython 3.12Windows x86-64

mistralrs_cuda-0.4.0-cp312-cp312-manylinux_2_39_x86_64.whl (25.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

mistralrs_cuda-0.4.0-cp311-none-win_amd64.whl (18.1 MB view details)

Uploaded CPython 3.11Windows x86-64

mistralrs_cuda-0.4.0-cp311-cp311-manylinux_2_39_x86_64.whl (25.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

mistralrs_cuda-0.4.0-cp310-none-win_amd64.whl (18.1 MB view details)

Uploaded CPython 3.10Windows x86-64

mistralrs_cuda-0.4.0-cp310-cp310-manylinux_2_39_x86_64.whl (25.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

File details

Details for the file mistralrs_cuda-0.4.0-cp312-none-win_amd64.whl.

File metadata

File hashes

Hashes for mistralrs_cuda-0.4.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 86d97b5245d328eb62e7b56a228d14fc78294839251025fab5199d086d3aba30
MD5 d89dbd2bc547f9a63a34812bacb79ec4
BLAKE2b-256 034f9e5cee9f246675b8cc03d0ee97d3e59cbf52198e775af5a7e89205cb0458

See more details on using hashes here.

File details

Details for the file mistralrs_cuda-0.4.0-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for mistralrs_cuda-0.4.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 a01113365e0776581ebef757768e3589e7d747d1ea587cea119e730a7dca01dc
MD5 0fdf471090400228e77a3fcfa7322949
BLAKE2b-256 86e46c795f719e521bd5681542f8f487931e7493dced72afacca8a6928fe4f17

See more details on using hashes here.

File details

Details for the file mistralrs_cuda-0.4.0-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for mistralrs_cuda-0.4.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 76fbb210769ae30ea2b9d6ba4a6a92286d2d3b6b8f0e7d8b585e6ef6f168c01e
MD5 923f8e74428c48205c61d1ca14d8936f
BLAKE2b-256 abaf4be229c3c7fbb1ac50ecd18fa9603fcff1dabb5fb1083f5acec18b71fa48

See more details on using hashes here.

File details

Details for the file mistralrs_cuda-0.4.0-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for mistralrs_cuda-0.4.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 103ed209af81b75bb26c4adb5d4dcd7e67c791409fd794db8170fca7a7a88fb2
MD5 062e0eaf72852902dc9504d52c19be6e
BLAKE2b-256 9d5d56cb28714f2f9de47e41172495e86664b239d4e1e784a86b70cc2c3e5759

See more details on using hashes here.

File details

Details for the file mistralrs_cuda-0.4.0-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for mistralrs_cuda-0.4.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 080458138d40342d791011407c75de8d2b65788ad6508e7a3edcf1ee897e9aa9
MD5 025617b302067f493980c53c07c5eab7
BLAKE2b-256 5b2949588d898384c2d44746b5e79a7fe6ff584c460a2aa296d37af7fa2b7ac1

See more details on using hashes here.

File details

Details for the file mistralrs_cuda-0.4.0-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for mistralrs_cuda-0.4.0-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 798e04e7b180a44d4f1017dec73426d42c07a83143c7743f133540af8af5db32
MD5 604de9722ba144bafe9d83de31a8665e
BLAKE2b-256 8f09069cb322aa3bdfb99800749c27d42a8875b08e54e0ae2b20b050c60f0786

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