mlx_augllm
MLX(Apple Silicon向け機械学習フレームワーク)を用いた、 ローカルで動作する LLM / VLM のための統一インターフェースライブラリです。
本ライブラリは以下を目的としています。
- ローカルLLM/VLMを簡単かつ一貫したAPIで扱える
- Tool Use(関数呼び出し)に対応
- 会話履歴の管理を自動化
- Apple Siliconに最適化
インストール
pip install -U mlx_augllm
- Apple Silicon必須
サンプル
from mlx_augllm import MlxAugmentedLLM, MlxLLMInterface, PromptBuilder
def run_test():
# モデルの準備
model_path = "mlx-community/gemma-3-27b-it-4bit"
augmented_llm = MlxAugmentedLLM(
llm_interface=MlxLLMInterface(
model_path=model_path,
use_vision=False,
temp=0.7,
top_k=50,
top_p=0.9,
min_p=0.05,
max_tokens=8192
),
prompt_builder=PromptBuilder(system_prompt_text="あなたは有能なアシスタントです。"),
)
# 実行テスト
user_query = "トポロジー最適化について教えてください。"
print(f"\nユーザーの問いかけ: {user_query}")
print("-" * 50)
print("AIの応答 (Streaming):")
# respond の呼び出し (contextを渡す)
response_generator = augmented_llm.respond(
user_text=user_query,
stream=True,
temp=0.7
)
full_response = ""
for chunk in response_generator:
print(chunk, end="", flush=True)
full_response += chunk
print("\n" + "-" * 50)
print("【内部レポート】")
if augmented_llm.report_text:
print(f"最終回答の文字数: {len(augmented_llm.report_text)}")
if __name__ == "__main__":
run_test()
Release files for mlx-augllm 1.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mlx_augllm-1.5.2.tar.gz | 18.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mlx_augllm-1.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.1 kB
Release files / mlx_augllm-1.5.2.tar.gz
| Download URL | mlx_augllm-1.5.2.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
028736d49201f96274bb3d8aa6d2e43a88f6004f3ef4d506bd4a391e21346bbd
|
|
BLAKE2b-256 checksum How to use checksums |
80debe2a354c79d32e8918e4aaa7048f26541dd395802acf6a09208519ca64a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / mlx_augllm-1.5.2-py3-none-any.whl
| Download URL | mlx_augllm-1.5.2-py3-none-any.whl |
|---|---|
| Size | 22.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c914b43a176a0e83080b1951dea021e64d65b5f980b77667c883485a8364364
|
|
BLAKE2b-256 checksum How to use checksums |
3a87d95396bdae6c7068e33d79f3940a9b30475c92634908db49095d13fd1681
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|