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_accelerate-0.3.2-cp312-cp312-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

mistralrs_accelerate-0.3.2-cp311-cp311-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

mistralrs_accelerate-0.3.2-cp310-cp310-macosx_11_0_arm64.whl (10.4 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

File details

Details for the file mistralrs_accelerate-0.3.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mistralrs_accelerate-0.3.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c13e1572fc8e387c07491047fa2eb9438904f24138f73b6c5a9307fa990efc18
MD5 cb557f736ee2c7538941801bc5880aa5
BLAKE2b-256 3096683cd9d37853c58d5b117ea839b9ac1ed745a40d90392f636c0b7b849634

See more details on using hashes here.

File details

Details for the file mistralrs_accelerate-0.3.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mistralrs_accelerate-0.3.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a05d239fffd6861a6093f48e7ccb940d2ad888b60c707e46984553e1d600239f
MD5 3c701c7c69e3a0f44fbbb787d45c6398
BLAKE2b-256 a20cb9372292616609101da420cda4a400051754c1c68d9055be528a7f720e67

See more details on using hashes here.

File details

Details for the file mistralrs_accelerate-0.3.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mistralrs_accelerate-0.3.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3d57607bbb873d9926418cfc48159d77871507ccfae65a59b09bbd0e0f1a86fa
MD5 162f8e300628876e8cd0a60dd08f51d8
BLAKE2b-256 319865ba6a50e7c613af2b00dcb01d35201875deb6d94bf45065757296bc360f

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