it's free*.ai

llamafile

llamafile は Mozilla の妙技です:GGUFウェイトとランタイム(llama.cpp + Cosmopolitan Libc)が1ファイルに同居しています。ダウンロード、chmod +x、実行。インストールもPythonもDockerも不要です。

llamafile は Mozilla の妙技です:GGUFウェイトとランタイム(llama.cpp + Cosmopolitan Libc)が1ファイルに同居しています。ダウンロード、chmod +x、実行。インストールもPythonもDockerも不要です。

`--server` でポート8080にOpenAI互換が立ちます。コンテキストは起動時の -c で指定。モデルを実行ファイルのまま人に渡したいときの正解です。

最大コンテキスト
Set with -c at launch
無料プラン
無制限・プライベート
条件
不要 — アカウントなし

エンドポイント

ベースURLhttp://localhost:8080/v1
レート制限None — it is your machine

コード例

npm install openai
import 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)

知っておくべきこと

無料で利用できるモデル2