Skip to main content

MLflow deployment plugin for Crusoe AI's managed inference API.

Project description

mlflow-crusoe

An MLflow deployment plugin for Crusoe AI's managed inference API.

This plugin lets you manage named model endpoint configurations and run inference on Crusoe's renewable-powered GPU infrastructure directly from MLflow's deployment interface.

Installation

pip install mlflow-crusoe

Setup

Set your Crusoe API key:

export CRUSOE_API_KEY="your-api-key"

You can generate one from the Crusoe Console under Security > Inference API Key.

Usage

import mlflow.deployments

client = mlflow.deployments.get_deploy_client("crusoe")

# Create a deployment
client.create_deployment(
    name="my-llm",
    model_uri="meta-llama/Llama-3.3-70B-Instruct",
    config={"temperature": 0.7, "max_tokens": 2048},
)

# Run inference
result = client.predict("my-llm", inputs={"prompt": "Hello!"})
print(result["choices"][0]["message"]["content"])

# List deployments
client.list_deployments()

# Update
client.update_deployment("my-llm", model_uri="deepseek-ai/DeepSeek-V3")

# Delete
client.delete_deployment("my-llm")

Input formats

The predict method accepts three input formats:

# Chat messages (recommended)
client.predict("my-llm", inputs={
    "messages": [
        {"role": "system", "content": "You are helpful."},
        {"role": "user", "content": "Hello!"},
    ]
})

# Simple prompt
client.predict("my-llm", inputs={"prompt": "Hello!"})

# Plain string
client.predict("my-llm", inputs="Hello!")

CLI

# Help
mlflow deployments help -t crusoe

# Create
mlflow deployments create -t crusoe --name my-llm -m meta-llama/Llama-3.3-70B-Instruct

# List
mlflow deployments list -t crusoe

# Predict
mlflow deployments predict -t crusoe --name my-llm --input '{"prompt": "Hi"}'

# Delete
mlflow deployments delete -t crusoe --name my-llm

Available Models

Model Identifier
Meta Llama 3.3 70B Instruct meta-llama/Llama-3.3-70B-Instruct
DeepSeek V3 (0324) deepseek-ai/DeepSeek-V3-0324
DeepSeek R1 (0528) deepseek-ai/DeepSeek-R1-0528
Google Gemma 3 12B google/gemma-3-12b-it
OpenAI GPT-OSS 120B openai/gpt-oss-120b
Qwen3 235B A22B Instruct Qwen/Qwen3-235B-A22B-Instruct-2507

See the Crusoe docs for latest availability.

Configuration

Key Default Description
api_key CRUSOE_API_KEY env var API key
api_base https://api.crusoe.ai/v1 API base URL
temperature 0.1 Sampling temperature (0-2)
max_tokens 1024 Max tokens to generate
top_p Nucleus sampling
frequency_penalty Frequency repetition penalty
presence_penalty Presence repetition penalty
stop Comma-separated stop sequences

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlflow_crusoe-0.1.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlflow_crusoe-0.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file mlflow_crusoe-0.1.1.tar.gz.

File metadata

  • Download URL: mlflow_crusoe-0.1.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for mlflow_crusoe-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cde3e29ac3ae48c60186bdb29d3110b3a1b92d53c90f01e92cf5a3fd37e2e926
MD5 0e63bc9538c463a2e86412c3a4614529
BLAKE2b-256 2cd35547766f5d3c96537dc9414298db3c161f4d596f809c3dcc0bc5ace15b60

See more details on using hashes here.

File details

Details for the file mlflow_crusoe-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mlflow_crusoe-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for mlflow_crusoe-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 404093e22b2dc6508176b6fdec7ca8947ea4e77a47784c98f99cc123660f9dc5
MD5 d51e6aed2648a3af76dc1615ac1e9df8
BLAKE2b-256 77f4b3e4cacedde38b2760b15ff1209cab2343dedd462678dfad59b512bbb207

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