1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

色々な Jev っぽいローカル LLM を扱える Ollaya が面白そう

1
Posted at

登場してからガンガン作られてる Jev っぽいローカルモデルなのですが、手元で動かすのが、手元で動かす設定とかがまあ大変…と思っていたら、Jev 版 Ollama みたいな Ollaya (Ollama + laya から命名?) というのが出ていたのでちょっと触ってみました。

※ …といってたら Ollama 側にも Jev っぽい decision model の対応が始まってますね。とはいえ、現状では対応しているモデルは Ollaya の方が多いです。

動かしてみる

https://ollaya.dev/ にサイトが公開されていて、 Mac, Windows, Linux で GUI, CLI 版がそれぞれ配布されています。(※ ただし、利用できる GPU が Nvidia のもの + Mac は一部のみと制限されています)

(サイトのテイストもめっちゃ Ollama っぽい)

image.png

CLI はこんな感じ。Ollama を使ったことがあるならなんとなく利用方法はイメージしやすそうです。

$ ollaya
Run open decision models locally

Usage: ollaya [COMMAND]

Commands:
  serve   Start ollaya
  run     Run a model: answer questions about a state, or start a REPL
  pull    Pull a model from a registry
  list    List models [alias: ls]
  ps      List running models
  show    Show information for a model
  rm      Remove a model
  cp      Copy a model
  stop    Stop a running model, or without one the server (which unloads every model)
  mcp     Serve the local models to AI agents over the Model Context Protocol
  create  Create a model from a Modelfile
  help    Print this message or the help of the given subcommand(s)

Options:
  -v, --version  Show version information
  -h, --help     Print help

Jev 互換のサーバーが起動でき、以下のように v1/systemone にクエリを投げると結果を返してくれます。

$ curl http://localhost:11435/v1/systemone -d '{
    "model": "winnow:e4b",
    "state": "I would like to return this iPhone",
    "questions": {
      "intent": {
        "type": "choice",
        "instructions": "What does the customer want?",
        "criteria": {
          "invoice": "Needs an invoice or receipt",
          "refund": "Wants money back",
          "other": "Anything else"
        }
      }
    }
  }' | jq .
{
  "model": "winnow:e4b",
  "answers": {
    "intent": {
      "type": "choice",
      "choice": "other",
      "confidence": 0.5681,
      "probabilities": {
        "invoice": 0.0302,
        "refund": 0.2577,
        "other": 0.7121
      }
    }
  },
  "usage": {
    "input_tokens": 119,
    "output_tokens": 0
  }
}

また、サクッと試すために、ollaya run で json を投げずとも直接試すこともできます。この場合はあらかじめ ollaya 側で用意したクエリが使われます。 (https://github.com/ollaya-dev/ollaya/tree/v0.7.5/crates/ollaya-api/src/presets)

$ ollaya run winnow:e4b --preset triage "Can I return this iPhone?"
intent            information                   ███████░░░░░░░░░ 0.45
is_urgent         no                            ███████████████░ 0.96
frustration       0.35 / 3  calm and neutral    ██████████░░░░░░ 0.61
refund_requested  no                            ████████████░░░░ 0.74
churn_risk        no                            ███████████████░ 0.92

GUI の見た目はこんな感じ。サーバーの起動やモデルのダウンロード、ollaya run 相当の簡単な分類を行えます。

image.png

image.png

いろんなモデルが使える

image.png

Ollama みたいに、公式でモデルカタログが用意されています。
モデルごとの特徴も把握しやすく、サイズやコンテキスト長、対応言語等も見れて、とてもわかり易いです。

image.png

いろんなモデルが用意されていますが、一方で、x86-64 かつ Nvidia GPU が使える環境以外だと、多くのケースで CPU 稼働になってパフォーマンスが出ないので要注意です。

Mac で動かす場合は一部のモデル (nli, laya) 以外は CPU 稼働、 AMD GPU は非対応となってます。
また、DGX Spark などの arm 環境もまだ未対応のようです。

個人的には DGX Spark や Strix Halo あたりで使えるようになると、ローカルで安定して Decision model が動かせて便利なので惜しいですね…

ただ、ハードルの低さ自体は目を見張るものがあるので、ゲーミング PC 等をお持ちの方は、サクッと手元でローカル Decision Model を体験するのにおすすめです。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?