Cloudflare 中文文档
Workers AI
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

mistral-7b-instruct-v0.2

Beta

Model ID: @hf/mistral/mistral-7b-instruct-v0.2

The Mistral-7B-Instruct-v0.2 Large Language Model (LLM) is an instruct fine-tuned version of the Mistral-7B-v0.2. Mistral-7B-v0.2 has the following changes compared to Mistral-7B-v0.1: 32k context window (vs 8k context in v0.1), rope-theta = 1e6, and no Sliding-Window Attention.

More Information  

​​ Properties

Task Type: Text Generation

Max batch prefill tokens: 8192

Max input tokens: 3072

Max total tokens: 4096

​​ Use the Playground

Try out this model with Workers AI Model Playground. It does not require any setup or authentication and an instant way to preview and test a model directly in the browser.

Launch the Model Playground

​​ Code Examples

Worker
curl

​​ Prompting

Part of getting good results from text generation models is asking questions correctly. LLMs are usually trained with specific predefined templates, which should then be used with the model’s tokenizer for better results when doing inference tasks.

We recommend using unscoped prompts for inference with LoRA.

​​ Unscoped prompts

You can use unscoped prompts to send a single question to the model without worrying about providing any context. Workers AI will automatically convert your { prompt: } input to a reasonable default scoped prompt internally so that you get the best possible prediction.

You can also use unscoped prompts to construct the model chat template manually. In this case, you can use the raw parameter. Here’s an input example of a Mistral chat template prompt:

​​ Responses

​​ API Schema

The following schema is based on JSON Schema

Input JSON Schema
Output JSON Schema

​​ More resources