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

Uploaded CPython 3.12 macOS 11.0+ ARM64

mistralrs_metal-0.3.2-cp311-cp311-macosx_11_0_arm64.whl (10.9 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

mistralrs_metal-0.3.2-cp310-cp310-macosx_11_0_arm64.whl (10.9 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for mistralrs_metal-0.3.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4270f9f0c90faebf309f43749c22a89c75372a05c8f251f4254f222057beb8f3
MD5 4ccd1e5406a75cbf7086f6e119ce6954
BLAKE2b-256 45854143edeafc56ba2a8c3a04b41548f1093a86a27aa2d900c25685da0ea98a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mistralrs_metal-0.3.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 929bc7bae0646b12de9f570c1056399e8d42ceab2fc8b117e9c70795188d93d9
MD5 571f8c11c784895fa745c4f7bac892b6
BLAKE2b-256 477bc321c058a89775b390833c5d712e05ca47dcd3c4db69089f60050e203ee2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mistralrs_metal-0.3.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc6c74cc1798690d564cfdc935dedd190fb4f719cab12aac4fed3f48576754df
MD5 d180b1b436afd9870ff530e4ec4d70b6
BLAKE2b-256 eff7ad234695b9b7eae9cda0ab268382db576c7d524323bad35fd3ce93b8ac56

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