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_mkl-0.5.0-cp312-none-win_amd64.whl (16.3 MB view details)

Uploaded CPython 3.12Windows x86-64

mistralrs_mkl-0.5.0-cp312-cp312-manylinux_2_39_x86_64.whl (19.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

mistralrs_mkl-0.5.0-cp311-none-win_amd64.whl (16.3 MB view details)

Uploaded CPython 3.11Windows x86-64

mistralrs_mkl-0.5.0-cp311-cp311-manylinux_2_39_x86_64.whl (19.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

mistralrs_mkl-0.5.0-cp310-none-win_amd64.whl (16.3 MB view details)

Uploaded CPython 3.10Windows x86-64

mistralrs_mkl-0.5.0-cp310-cp310-manylinux_2_39_x86_64.whl (19.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

File details

Details for the file mistralrs_mkl-0.5.0-cp312-none-win_amd64.whl.

File metadata

File hashes

Hashes for mistralrs_mkl-0.5.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 af2adfc781d5e0cdebff97d8bdd9ea5f99c9b2602c55833ef76aa0ff25dc9401
MD5 037e40c51af42843ff4abb3f0c3671f3
BLAKE2b-256 7073a79a7db56e22ef417930da664dc1104742a162fba3df4e44bc2cbf98c662

See more details on using hashes here.

File details

Details for the file mistralrs_mkl-0.5.0-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for mistralrs_mkl-0.5.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 de7cff374066d270f93e4fb99c3adc07d5defe3bccfd0338f4f81613320981fd
MD5 55ae1fc1db75c77c16e2c348a5e68f59
BLAKE2b-256 a200fd5882c9fc56f712b2431c149b8d26d057105a02fbf13cb9e59d4f01ebbb

See more details on using hashes here.

File details

Details for the file mistralrs_mkl-0.5.0-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for mistralrs_mkl-0.5.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 46e8b6f791f447a1b0dbc37ca83fe162ba85545a509984b6de37bcd39751be3a
MD5 398ffd51bd9ad1c89b17d1c97be092b4
BLAKE2b-256 d44fcdb1c79be82658dab3d80fb9285ade04f4ae3fe12e5dd39ce941b88cbc23

See more details on using hashes here.

File details

Details for the file mistralrs_mkl-0.5.0-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for mistralrs_mkl-0.5.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 bf93f16959d46d1b91d8804ce8d47a9555dbc71bc832acc285e10d23078f03dc
MD5 e756b584f8fd89022efcc07f8566519a
BLAKE2b-256 a6d23de0ec5d95e98a5e53b89479bcb8f1aa40cd9fe1710c0a9552e1a7fb3e7a

See more details on using hashes here.

File details

Details for the file mistralrs_mkl-0.5.0-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for mistralrs_mkl-0.5.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 c5637d29f3ca4ccad203c95f5a700a5e33b8b7ada73a72a4eec057702fb5a47a
MD5 df982ef6e51c6d2a814834cf7cac6354
BLAKE2b-256 1f37bb7b7965e642e2656cd4cd35c8ab376ef8e26bab7a079d96982a1977a39b

See more details on using hashes here.

File details

Details for the file mistralrs_mkl-0.5.0-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for mistralrs_mkl-0.5.0-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 f6175a50afd1b2b42f89ecb16ffee0314073ac93159dbe97b8b538ad3d54ed5d
MD5 1e1ac1da3f8a58ef393979409818daa2
BLAKE2b-256 d96d9da41ea7357cdc9796fe5a015cf229f592d71e68c8442bd69861bd0ba882

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