欧洲最强开源 LLM,7B 模型性能超群,支持多语言。
ollama pull mistral (7B版本)ollama pull mixtral:8x7b (MoE版本)ollama run mistral注册 console.mistral.ai 获取 API Keypip install mistralaifrom mistralai import Mistral
client = Mistral(api_key='...')
response = client.chat.complete(model='mistral-large-latest', messages=[...])支持 Function Calling + JSON Modepip install transformers torch acceleratefrom transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('mistralai/Mistral-7B-Instruct-v0.3', load_in_4bit=True)tokenizer = AutoTokenizer.from_pretrained('mistralai/Mistral-7B-Instruct-v0.3')4-bit 量化大幅降低显存需求