본문으로 건너뛰기
AIDevOps
  • Learn
  • Learning Paths
  • Practice
  • Open Source
  • Books
  • Engineering

    AI DevOpsAI 서비스 개발·운영 전체 지도LLMOpsLLM 배포·평가·관측실전 프로젝트AI Agent 프로젝트 실습

    Knowledge

    Docs기술 문서 모음Blog엔지니어링 아티클Plogger개발 기록 피드

    Validate

    Certification3단계 역량 인증 · 준비 중
AI Models
LlamaMistralGemmaDeepSeekQwen
🧠 AI Core
AI 입문 & 로드맵ML FundamentalsLLM Fundamentals|Python AIC++|PyTorchTensorFlowJAX
🤖 AI 실전 개발
AI 실전 입문 & 로드맵Hugging FaceLangChainLlamaIndexLLMOps|LangGraphMCPMulti-AgentAgent Evaluation
🧠 AI Agent 개발
금융 AI AgentLLM API 서버주식 투자 AgentAIOps AI Agent교육 AI Agent코딩 AI Agent
🌱 Spring Cloud
Spring 입문 & 로드맵Spring Cloud GatewaySpring BootJava|Spring AISpring SecuritySpring BatchSpring JPA
🐳 DevOps
DevOps 입문 & 로드맵LinuxDockerCI/CD|Kubernetes 기본K8s 심화/실무PrometheusGrafana
🧱 인프라
인프라 입문 & 로드맵NginxRedis
☁️ 클라우드
클라우드 입문 & 로드맵AWSGCPAzureNCPCloudflare
🎨 Frontend
Frontend 입문 & 로드맵JavaScriptTypeScript|ReactNext.js|VueNuxt
📱 Mobile
Mobile 입문 & 로드맵KotlinAndroidFlutter
⚙️ Backend
Backend 입문 & 로드맵Python 기본FastAPIDjangoFlask|CGoGinNode.js
💾 Database
DB 입문 & 로드맵공통 SQLOracleMySQLPostgreSQL|MongoDB벡터 DB
🧪 검증
k6JMeternGrinder
AIDevOps

Engineering AI. From Code to Production.
AI와 AI Agent를 개발하고 운영하기 위한 엔지니어링 학습 플랫폼

Learn

  • 전체 가이드
  • Learning Paths
  • Practice
  • Books

Resources

  • AI DevOps
  • LLMOps
  • 실전 프로젝트
  • Docs
  • Blog
  • Plogger
  • Open Source
  • Certification (준비 중)

Start Here

  • AI Core 로드맵
  • AI 실전 개발 로드맵
  • Spring Cloud 로드맵
  • DevOps 로드맵
  • 인프라 로드맵

 

  • 클라우드 로드맵
  • Frontend 로드맵
  • Mobile 로드맵
  • Backend 로드맵
  • Database 로드맵
© 2026 AI DevOps Korea. All rights reserved.
이용약관개인정보처리방침Sitemaptestforge.kr
AI 오픈소스 모델 가이드

🌊 Mistral 완전 가이드

Visitors

유럽 최고의 AI 스타트업 Mistral AI의 오픈소스 모델 시리즈. Mistral 7B의 뛰어난 효율성부터 Mixtral MoE(전문가 혼합) 아키텍처, Function Calling, 다국어 지원까지 상세히 다룹니다.

← AI DevOps 홈으로
🌊

Mistral 실전 예제

Function Calling, Mixtral MoE, RAG 파이프라인 예제 코드 모음.

실전 예제 보기 →

목차

0 / 7
  1. Mistral 소개
  2. 모델 라인업
  3. Ollama로 실행
  4. Mistral AI 공식 API
  5. Function Calling
  6. Python 실용 패턴
  7. Mixtral MoE 아키텍처
목차 7개 섹션
  1. Mistral 소개
  2. 모델 라인업
  3. Ollama로 실행
  4. Mistral AI 공식 API
  5. Function Calling
  6. Python 실용 패턴
  7. Mixtral MoE 아키텍처

Mistral 소개

Mistral AI는 2023년 프랑스에서 설립된 AI 스타트업으로, 효율성과 성능 모두를 추구하는 오픈소스 LLM을 개발합니다. Mistral 7B는 출시 당시 같은 크기의 어떤 모델보다 뛰어난 성능을 보여주며 주목받았습니다.

모델 라인업

모델특징라이선스
Mistral 7B소형 고성능, Llama 13B 능가Apache 2.0
Mixtral 8x7BMoE, 실제 활성 파라미터 12BApache 2.0
Mixtral 8x22B대형 MoE, GPT-3.5 수준Apache 2.0
Mistral LargeAPI 전용 프리미엄 모델상용

Ollama로 실행

BASH
ollama run mistral          # Mistral 7B
ollama run mixtral          # Mixtral 8x7B
ollama run mixtral:8x22b    # Mixtral 8x22B

Mistral AI 공식 API

BASH
pip install mistralai
mistral_api.pyPYTHON
from mistralai import Mistral

client = Mistral(api_key="YOUR_API_KEY")

response = client.chat.complete(
    model="mistral-small-latest",
    messages=[{"role": "user", "content": "Mixtral MoE가 뭔가요?"}],
)
print(response.choices[0].message.content)
💡

로컬 Ollama를 사용하면 API 키 없이 무료로 사용 가능합니다. OpenAI 호환 엔드포인트: http://localhost:11434/v1

Function Calling

Mistral은 강력한 Function Calling(도구 사용)을 지원합니다.

function_calling.pyPYTHON
from mistralai import Mistral
import json

client = Mistral(api_key="YOUR_API_KEY")

tools = [{
    "type": "function",
    "function": {
        "name": "get_weather",
        "description": "특정 도시의 현재 날씨를 가져옵니다.",
        "parameters": {
            "type": "object",
            "properties": {
                "city": {"type": "string", "description": "도시 이름"},
            },
            "required": ["city"],
        },
    },
}]

response = client.chat.complete(
    model="mistral-small-latest",
    messages=[{"role": "user", "content": "서울 날씨 알려줘"}],
    tools=tools,
    tool_choice="auto",
)

# 도구 호출 처리
if response.choices[0].finish_reason == "tool_calls":
    tool_call = response.choices[0].message.tool_calls[0]
    args = json.loads(tool_call.function.arguments)
    print(f"함수 호출: {tool_call.function.name}({args})")

Python 실용 패턴

시스템 프롬프트 설정

PYTHON
messages = [
    {"role": "system", "content": "당신은 친절한 한국어 코딩 어시스턴트입니다."},
    {"role": "user",   "content": "Python 데코레이터를 설명해주세요."},
]

대화 히스토리 관리

PYTHON
history = []

def chat(user_input: str) -> str:
    history.append({"role": "user", "content": user_input})
    response = client.chat.complete(model="mistral-small-latest", messages=history)
    assistant_msg = response.choices[0].message.content
    history.append({"role": "assistant", "content": assistant_msg})
    return assistant_msg

Mixtral MoE 아키텍처

Mixtral은 MoE(Mixture of Experts) 아키텍처를 사용합니다. 총 8개의 전문가(Expert) 레이어가 있지만, 각 토큰 처리 시 2개만 활성화됩니다. 이 덕분에 56B 파라미터를 가지면서도 실제 계산량은 12B 수준입니다.

항목Mistral 7BMixtral 8x7B
총 파라미터7B56B
활성 파라미터7B~12B
컨텍스트 길이32K64K
추론 속도빠름7B와 유사