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
Release history Release notifications | RSS feed
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
File details
Details for the file mistralrs_cuda-0.3.2-cp312-cp312-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: mistralrs_cuda-0.3.2-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 23.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb3afff5c1cb4840222149d4285cae252a12b15c8c26fa8d0b533d4077b96c29 |
|
MD5 | cfa9ce22bb5a2ee7edd3da54f31e9454 |
|
BLAKE2b-256 | 35415230a8e6fd59db62deee672b4cbe5377e9fd9d4e78f46b8130d3f943027a |
File details
Details for the file mistralrs_cuda-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: mistralrs_cuda-0.3.2-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 23.5 MB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fbf2d1391082769a0ee433d826d3133174e629f5df73f34eb8aba99f641db1c |
|
MD5 | 61e3d7e5c2a68f2fa7b522315a8ab20f |
|
BLAKE2b-256 | 21802efae216147467018672e660426ca7c918c1c37626fbdfb0425b46a9709b |
File details
Details for the file mistralrs_cuda-0.3.2-cp310-cp310-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: mistralrs_cuda-0.3.2-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 23.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5fc53994702e7a9be3339ac6dfd133608b05b0e6133a6702ad9d3e6934c24c4 |
|
MD5 | 524c4331b9172f543f9d19836f9ffca0 |
|
BLAKE2b-256 | 3a5d6902f12c9ce24d8848711a73cc7c41926a0d51c48f91d46fc6dcdebc33de |