llamafile
llamafile은 Mozilla의 묘수입니다: GGUF 웨이트와 런타임(llama.cpp + Cosmopolitan Libc)이 한 파일에 함께 있습니다. 다운로드, chmod +x, 실행. 설치도 Python도 Docker도 필요 없습니다.
llamafile은 Mozilla의 묘수입니다: GGUF 웨이트와 런타임(llama.cpp + Cosmopolitan Libc)이 한 파일에 함께 있습니다. 다운로드, chmod +x, 실행. 설치도 Python도 Docker도 필요 없습니다.
`--server`가 8080 포트에 OpenAI 호환을 엽니다. 컨텍스트는 실행 시 -c로 지정합니다. 모델을 실행 파일 채로 건네주고 싶을 때의 정답입니다.
- 최대 컨텍스트
- Set with -c at launch
- 무료 요금제
- 무제한·비공개
- 요구사항
- 아무것도 없음 — 계정 불필요
엔드포인트
기본 URL
http://localhost:8080/v1속도 제한
None — it is your machine- OpenAI 호환
- 텍스트
코드 예시
npm install openaiimport OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'http://localhost:8080/v1',
apiKey: 'not-needed'
})
const response = await client.chat.completions.create({
model: 'LLaMA_CPP',
messages: [{ role: 'user', content: 'Explain closures in one paragraph.' }]
})
console.log(response.choices[0].message.content)pip install openaifrom openai import OpenAI
client = OpenAI(
base_url="http://localhost:8080/v1",
api_key="not-needed",
)
response = client.chat.completions.create(
model="LLaMA_CPP",
messages=[{"role": "user", "content": "Explain closures in one paragraph."}],
)
print(response.choices[0].message.content)curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "LLaMA_CPP",
"messages": [{"role": "user", "content": "Explain closures in one paragraph."}]
}'알아두면 좋은 점
- `chmod +x model.llamafile && ./model.llamafile --server`이면 끝입니다.
무료로 받는 모델2
- Llama 3.3 70B
llama-3.3-70b - Mixtral 8x7B
open-mixtral-8x7b