LlamaGate
LlamaGate
LlamaGate는 크레딧 기반 과금이 있는 오픈소스 LLM용 OpenAI 호환 API 게이트웨이예요. Llama, Mistral, DeepSeek, Qwen을 포함한 26개 이상의 오픈소스 모델에 경쟁력 있는 가격으로 접근할 수 있어요.
출처: 문서
본문
개요 (Overview)
| 속성 | 설명 |
|---|---|
| 설명 | 크레딧 기반 과금의 오픈소스 LLM용 OpenAI 호환 API 게이트웨이. Llama, Mistral, DeepSeek, Qwen 등 26+ 오픈소스 모델에 경쟁력 있는 가격으로 접근 |
| LiteLLM 라우트 | llamagate/ |
| 공급자 문서 | LlamaGate Documentation |
| 기본 URL | https://api.llamagate.dev/v1 |
| 지원 작업 | /chat/completions |
LlamaGate란?
LlamaGate는 OpenAI 호환 API로 오픈소스 LLM에 접근을 제공해요:
- 26+ 오픈소스 모델: Llama 3.1/3.2, Mistral, Qwen, DeepSeek R1 등
- OpenAI 호환 API: OpenAI SDK의 드롭인 대체
- 비전 모델: 멀티모달 태스크용 Qwen VL, LLaVA, olmOCR, UI-TARS
- Reasoning 모델: 복잡한 문제 해결용 DeepSeek R1, OpenThinker
- 코드 모델: CodeLlama, DeepSeek Coder, Qwen Coder, StarCoder2
- 경쟁력 있는 가격: 백만 토큰당 $0.02-$0.55
필수 변수
os.environ["LLAMAGATE_API_KEY"] = "" # your LlamaGate API key
llamagate.dev에서 API 키를 가져와요.
지원 모델 (Supported Models)
일반 목적
| 모델 | 모델 ID |
|---|---|
| Llama 3.1 8B | llamagate/llama-3.1-8b |
| Llama 3.2 3B | llamagate/llama-3.2-3b |
| Mistral 7B v0.3 | llamagate/mistral-7b-v0.3 |
| Qwen 3 8B | llamagate/qwen3-8b |
| Dolphin 3 8B | llamagate/dolphin3-8b |
Reasoning 모델
| 모델 | 모델 ID |
|---|---|
| DeepSeek R1 8B | llamagate/deepseek-r1-8b |
| DeepSeek R1 Distill Qwen 7B | llamagate/deepseek-r1-7b-qwen |
| OpenThinker 7B | llamagate/openthinker-7b |
코드 모델
| 모델 | 모델 ID |
|---|---|
| Qwen 2.5 Coder 7B | llamagate/qwen2.5-coder-7b |
| DeepSeek Coder 6.7B | llamagate/deepseek-coder-6.7b |
| CodeLlama 7B | llamagate/codellama-7b |
| CodeGemma 7B | llamagate/codegemma-7b |
| StarCoder2 7B | llamagate/starcoder2-7b |
비전 모델
| 모델 | 모델 ID |
|---|---|
| Qwen 3 VL 8B | llamagate/qwen3-vl-8b |
| LLaVA 1.5 7B | llamagate/llava-7b |
| Gemma 3 4B | llamagate/gemma3-4b |
| olmOCR 7B | llamagate/olmocr-7b |
| UI-TARS 1.5 7B | llamagate/ui-tars-7b |
LiteLLM은 현재 LlamaGate를
/chat/completions에만 지원해요.litellm.embedding()은 llamagate/ 라우트에서 지원되지 않아요.
LiteLLM Python SDK 사용법
비스트리밍 (Non-streaming)
import os
import litellm
from litellm import completion
os.environ["LLAMAGATE_API_KEY"] = "" # your LlamaGate API key
messages = [{"content": "What is the capital of France?", "role": "user"}]
# LlamaGate call
response = completion(
model="llamagate/llama-3.1-8b",
messages=messages
)
print(response)
스트리밍 (Streaming)
import os
import litellm
from litellm import completion
os.environ["LLAMAGATE_API_KEY"] = "" # your LlamaGate API key
messages = [{"content": "Write a short poem about AI", "role": "user"}]
# LlamaGate call with streaming
response = completion(
model="llamagate/llama-3.1-8b",
messages=messages,
stream=True
)
for chunk in response:
print(chunk)
비전 (Vision)
import os
import litellm
from litellm import completion
os.environ["LLAMAGATE_API_KEY"] = "" # your LlamaGate API key
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What's in this image?"
},
{
"type": "image_url",
"image_url": {"url": "https://example.com/image.jpg"}
}
]
}
]
# LlamaGate vision call
response = completion(
model="llamagate/qwen3-vl-8b",
messages=messages
)
print(response)
LiteLLM Proxy Server 사용법
1. 환경에 키 저장
export LLAMAGATE_API_KEY=""
2. Proxy 시작
model_list:
- model_name: llama-3.1-8b
litellm_params:
model: llamagate/llama-3.1-8b
api_key: os.environ/LLAMAGATE_API_KEY
- model_name: deepseek-r1
litellm_params:
model: llamagate/deepseek-r1-8b
api_key: os.environ/LLAMAGATE_API_KEY
- model_name: qwen-coder
litellm_params:
model: llamagate/qwen2.5-coder-7b
api_key: os.environ/LLAMAGATE_API_KEY
지원되는 OpenAI 파라미터
LlamaGate는 모든 표준 OpenAI 호환 파라미터를 지원해요:
| 파라미터 | 타입 | 설명 |
|---|---|---|
| messages | array | 필수. 'role'과 'content'가 있는 메시지 객체 배열 |
| model | string | 필수. Model ID |
| stream | boolean | 선택. 스트리밍 응답 활성화 |
| temperature | float | 선택. 샘플링 온도 (0-2) |
| top_p | float | 선택. Nucleus sampling 파라미터 |
| max_tokens | integer | 선택. 생성할 최대 토큰 수 |
| frequency_penalty | float | 선택. 빈번한 토큰에 패널티 |
| presence_penalty | float | 선택. 존재에 기반한 토큰 패널티 |
| stop | string/array | 선택. 중지 시퀀스 |
| tools | array | 선택. 사용 가능한 도구/함수 목록 |
| tool_choice | string/object | 선택. 도구/함수 호출 제어 |
| response_format | object | 선택. JSON mode 또는 JSON schema |
가격 (Pricing)
LlamaGate는 경쟁력 있는 토큰당 가격을 제공해요:
| 모델 카테고리 | 입력 (1M당) | 출력 (1M당) |
|---|---|---|
| 소형 (3-4B) | $0.03-$0.04 | $0.08 |
| 중형 (7-8B) | $0.03-$0.15 | $0.05-$0.55 |
| 코드 모델 | $0.06-$0.10 | $0.12-$0.20 |
| Reasoning | $0.08-$0.10 | $0.15-$0.20 |