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.4.0-cp312-none-win_amd64.whl (15.5 MB view details)

Uploaded CPython 3.12Windows x86-64

mistralrs_mkl-0.4.0-cp312-cp312-manylinux_2_39_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

mistralrs_mkl-0.4.0-cp311-none-win_amd64.whl (15.5 MB view details)

Uploaded CPython 3.11Windows x86-64

mistralrs_mkl-0.4.0-cp311-cp311-manylinux_2_39_x86_64.whl (20.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

mistralrs_mkl-0.4.0-cp310-none-win_amd64.whl (15.5 MB view details)

Uploaded CPython 3.10Windows x86-64

mistralrs_mkl-0.4.0-cp310-cp310-manylinux_2_39_x86_64.whl (20.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

File details

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

File metadata

File hashes

Hashes for mistralrs_mkl-0.4.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 09e854b9d5645ca8a4e59b6b0fb62aceb497aad88d3e02ea9f8faf77196a9724
MD5 8c24d752b31d6f3fe4914a1c457357a0
BLAKE2b-256 cbcf4f10ec4f0cc2d31868079955ae94c1cc06843383a0f29f88c01989d33227

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mistralrs_mkl-0.4.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 4b0677c78b0fcf4327968dbab86f109aafaa189e1944d3132b0f79e05b460369
MD5 c4121da0e2bef1b83088fc2e15c7387a
BLAKE2b-256 f6c7a2ee0dc8fa01c290a9e46b6350d86bc69c34e553022ed123e914acfe8b01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mistralrs_mkl-0.4.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 87678a078011ad15c3b53bd08562f7df7d9b76dc395a985d502b89edbc5060a0
MD5 e44c3b2d75619abd3642328c1aa08dd9
BLAKE2b-256 863850f9f251ce4d1c27759bc3acdcaff8c2521811289d4983be7f8b1cbb420a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mistralrs_mkl-0.4.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 34b61bc70ea30f0dac432e97fbfe948d408cdb5292eb2cda3d50c1cdf8ce9c1f
MD5 1a9ca81cbb00a48a162029b0cb388542
BLAKE2b-256 edfeb0f2c93e0c7c109ee3c88dd15748e392622846efe27c0d9841f095239976

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mistralrs_mkl-0.4.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 e087f8fa4bc4b269fc0978283637d566c4878dae098d4036d863a1e719ab58b2
MD5 80f1e005f89648232fa4555d827d7036
BLAKE2b-256 38d38bc3b41a4e47f01141d4ae5a59a809903696316c6766d8c868ed76190c1d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mistralrs_mkl-0.4.0-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 188f9920691b7117f4f1f553a0dbb40934ff66b4ef3fd0e691e871b7d8e12d08
MD5 b6e58dfa84b12931ee0c70386933c2fc
BLAKE2b-256 ecbc3471bd2d57930db41feb335e4dd1f30cc9965e281b3b3ca134c15c375c69

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