moinnadeem / mlc_llama_70b

  • Public
  • 144 runs
  • L40S
Iterate in playground

Input

pip install replicate
Set the REPLICATE_API_TOKEN environment variable:
export REPLICATE_API_TOKEN=<paste-your-token-here>

Find your API token in your account settings.

Import the client:
import replicate

Run moinnadeem/mlc_llama_70b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

output = replicate.run(
    "moinnadeem/mlc_llama_70b:2d111781313501c38cd851f57ba5c22977435c247eb8ead5ed679437f75d4822",
    input={
        "top_p": 0.9,
        "prompt": "Can you write a poem about open source machine learning? Let's make it in the style of E. E. Cummings.",
        "temperature": 0.75,
        "system_prompt": "You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.\n\nIf a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.\n",
        "max_new_tokens": 128,
        "repetition_penalty": 1.15
    }
)

# The moinnadeem/mlc_llama_70b model can stream output as it's running.
# The predict method returns an iterator, and you can iterate over that output.
for item in output:
    # https://replicate.com/moinnadeem/mlc_llama_70b/api#output-schema
    print(item, end="")

To learn more, take a look at the guide on getting started with Python.

Output

No output yet! Press "Submit" to start a prediction.

Run time and cost

This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

This model doesn't have a readme.