2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Mac mini で ローカルLLM:「Qwen3-30B-A3B」「Phi-4-reasoning」を MLX LM で試す(量子化された MLX版)

Posted at

はじめに

M4 の Mac mini で、MLX版のモデルを使ったローカルLLM を試しているのですが、その流れの 1つです。

過去に試したものの一部は、以下の検索に出てくる記事に書いています。

●「ローカルLLM user:youtoy」の検索結果 - Qiita
 https://qiita.com/search?q=%E3%83%AD%E3%83%BC%E3%82%AB%E3%83%ABLLM%20user%3Ayoutoy&sort=created

今回は、まだ試していない「Qwen3-30B-A3B」「Phi-4-reasoning」を使ってみます。

関連する公式のポスト

実際に試す

試す環境

試す環境について、モデル以外のところは過去にも使った以下の環境を利用します。

補足:使ってみるモデル

今回試したモデルについての補足ですが、自分の Mac mini で使えるものを選びました。

Qwen3-30B-A3B は、以下のモデルサイズになるものです。

https://huggingface.co/mlx-community/Qwen3-30B-A3B-mixed-3-4bit/tree/main
image.png

また Phi-4-reasoning は、以下です。

https://huggingface.co/mlx-community/Phi-4-reasoning-8bit/tree/main
image.png

https://huggingface.co/mlx-community/Phi-4-reasoning-plus-8bit/tree/main
image.png

コマンドラインで試す

Phi-4-reasoning

先に Phi-4-reasoning(Phi-4-reasoning-plus-8bit、Phi-4-reasoning-8bit)で試した内容と結果を載せます。

2つのモデルのどちらでも、以下の同じプロンプトで試しました。

mlx_lm.generate --model mlx-community/Phi-4-reasoning-plus-8bit --prompt "生成AIを8歳に分かるように短い言葉で説明して" --max-tokens 1024
mlx_lm.generate --model mlx-community/Phi-4-reasoning-8bit --prompt "生成AIを8歳に分かるように短い言葉で説明して" --max-tokens 1024

今回、どちらの場合も の途中で無限ループのような状態になりました。

image.png

image.png

Qwen3-30B-A3B

Qwen3-30B-A3B(Qwen3-30B-A3B-mixed-3-4bit)で試した内容と結果を示します。

先ほどのものを少し変えた、以下のプロンプトで試しました。

mlx_lm.generate --model mlx-community/Qwen3-30B-A3B-mixed-3-4bit --prompt "生成AIを8歳に分かる内容で文章3つ・日本語の文で説明して" --max-tokens 1024
mlx_lm.generate --model mlx-community/Qwen3-30B-A3B-mixed-3-4bit --prompt "生成AIを8歳に分かる内容で短く説明して" --max-tokens 1024

それらを試した時の様子を動画にしてみました。
※ 動画の冒頭、 <think> がいきなり表示されていますが、コマンド実行直後からの 3〜4秒くらいをカットしています

直近で試していたモデルと比較すると、かなり出力がはやいです。性能は評価できてないので、それは別途確認できればと思います。

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?