C.W.K.
Stream
Lesson 03 of 05 · published

MLX 경계

~14 min · ops, mlx, boundary

Level 0Downloader
0 XP0/41 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

이 quest이 MLX에 얕은 이유

MLX는 Apple-native ML framework — 빠르고, 잘 디자인됐고, 깊이 공부할 가치 있어. 근데 또 빠르게 움직이는 표적이야: API 변하고, breaking change 흔하고, stale 튜토리얼이 도움보다 오해 더 많이 일으켜. 이 quest에서 MLX 깊이 다루면 빨리 stale 되거나 quest를 모두에게 하드웨어 없는 "Apple-only" 영역으로 밀어 넣음.

지금 알아야 할 거

  • MLX 존재. Apple Silicon 전용.
  • Ollama가 Apple Silicon에서 (v0.19+) 내부에서 MLX 사용. 대부분 user는 MLX 직접 안 만져.
  • MLX 직접 사용 entry point는 PyPI의 mlx-lm: pip install -U mlx mlx-lm.
  • 모델은 HuggingFace의 mlx-community org에 있음.

MLX deep-dive 어디?

별도의 MLX 전용 quest. 그게 존재할 때까지 Apple Silicon에서 daily local AI는 Ollama 사용, mlx-lm 직접 잡는 건 (a) MLX 전용 모델 필요, (b) MLX의 NumPy-같은 API에서 이득 보는 커스텀 파이프라인 만들기, (c) MLX 자체에 기여 — 일 때만.

Code

진짜 필요할 때 MLX 직접 사용·bash
# 항상 최신 MLX로 시작 — API 빠르게 변함
pip install -U mlx mlx-lm

# mlx-community에서 모델 직접 실행
mlx_lm.generate \
  --model mlx-community/Qwen2.5-7B-Instruct-4bit \
  --prompt "Define unified memory in two sentences." \
  --max-tokens 200

# 프로그램 API
python3 - <<'PY'
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/Qwen2.5-7B-Instruct-4bit")
print(generate(model, tokenizer, prompt="Hello!", max_tokens=100))
PY

External links

Exercise

mlx-lm 설치하고 모델 하나 직접 실행. 그다음 Ollama-on-MLX 대신 raw MLX 잡을 이유 셋 list. (대부분 reader엔 오늘 0개 — 그러면 명시적으로 메모.)

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.