Step 7 · Conclusion · Conclusion · Recommended Architecture and Handoff PT
Local AI Cluster · Visual Course

Recommended Architecture and Handoff

Close the project with the final reference stack, a delivery checklist and a clear next-steps roadmap.

Lesson objectives
  • Apresentar a arquitetura final recomendada para o M5 Max 128 GB.
  • Revisar trade-offs e decisões do curso.
  • Fornecer um checklist de handoff e referências rápidas.
Read first (primary source)

report-cluster-ai.html in the workspace — interactive document that consolidated the research and originated this course.

Read the simple version, or open the technical layer in any section.
1

The big idea


The final architecture is a local multimodal pre-processor: Qwen3.6-35B-A3B handles text/code/RAG, Gemma 4 handles vision+audio, DeepSeek-V4-Flash is available on demand for 1M-token context, and RAG/orchestration filter what goes to the cloud.

Think of a lean factory: local machines do the repetitive, cheap work; the external assembly line only steps in when a part needs artisanal finishing. The result is speed, privacy and controlled cost.

Under the hood

Recommendation from report-cluster-ai.html (July 2026): run three models side by side — Qwen3.6-35B-A3B-MLX-8bit (~22–28 GB, ~80 tok/s), Gemma-4-26B-A4B-MLX-4bit (~18 GB) and DeepSeek-V4-Flash-GGUF UD-IQ3_XXS (~103 GB) on demand. That leaves ~78 GB for Qwen + Gemma + buffers/KV-cache. DeepSeek-V4-Flash is reserved for 1M-token context; Qwen3.6-35B-A3B is the default text/code engine.

Qwen3.6-35B-A3B 8-bit · ~22–28 GB · text/code/RAG 256K context · ~80 tok/s Gemma-4-26B-A4B 4-bit · ~18 GB · vision+audio 256K context DeepSeek-V4-Flash UD-IQ3_XXS · ~103 GB 1M context · on demand RAG + Orchestration pgvector · bge-m3 · LangGraph Final stack: two hot models + one giant on demand + RAG/orchestration
Recommended architecture for the Mac M5 Max 128 GB.
2

Trade-offs and decisions


No choice is perfect. Qwen3.6-35B-A3B is fast and lean, but does not reach 1M context. DeepSeek-V4-Flash reaches 1M, but takes up almost all RAM. Gemma 4 is native multimodal, but lags behind Qwen3.6-35B-A3B on hard code. The handoff documents these decisions for whoever continues the project.

Under the hood

Recorded decisions: default MLX engine; Qwen3.6-35B-A3B as main LLM; Gemma-4-26B-A4B for VLM/audio; DeepSeek-V4-Flash on demand for 1M-token context; RAG with pgvector + bge-m3; orchestration via LangGraph/n8n; Open WebUI frontend; Ollama as a quick fallback.

Qwen3.6-35B-A3B ~80 tok/s · PT/EN · 256K DeepSeek V4 1M ctx · slow · ~103 GB Gemma 4 multimodal · 256K · 140+ languages Every model has a superpower and a limitation
Trade-offs that guide model choice.
3

Handoff checklist


Para entregar o projeto, verifique: ferramentas instaladas, modelos baixados, servidores subindo, Open WebUI acessível, RAG configurado e documentação de decisões. O handoff garante que outra pessoa (ou você no futuro) consiga retomar sem adivinhar.

Under the hood

Technical checklist: which ollama mlx_lm python3 node npm gh brightdata; models mlx-community/Qwen3.6-35B-A3B-8bit, Gemma-4-26B-A4B-MLX-4bit, GLM-OCR-bf16, Kokoro-82M-bf16, Qwen3-ASR-1.7B-8bit; servers on ports 8080/8081/8000; Postgres + pgvector; Open WebUI at localhost:3000.

Instalar Baixar modelos Subir servidores RAG Doc
Cinco passos para um handoff confiável.
Terminal · validação rápida
# Verifique se as ferramentas estão no PATH
which ollama mlx_lm python3 node npm gh brightdata

# Teste o servidor de texto
curl http://localhost:8080/v1/models

# Teste pgvector
psql rag_local -c "SELECT * FROM pg_extension WHERE extname='vector';"
4

Try it


Test what you learned with quick exercises.

Revisão do curso
Qual é a função do cluster local?
b está correta. O cluster filtra e enxuga tarefas antes de enviar à nuvem.
Qual motor é nativo e mais rápido no Apple Silicon?
a está correta. MLX foi projetado para Metal e Unified Memory.
Which model is recommended for document OCR?
c is correct. GLM-OCR is a specialist and leads document benchmarks.
5 next steps
  1. Run pip install -U mlx-lm mlx-vlm mlx-audio and validate the install.
  2. Download mlx-community/Qwen3.6-35B-A3B-8bit and measure tok/s on your typical prompt.
  3. Start mlx_vlm.server with Gemma-4-26B-A4B and describe an image.
  4. Set up Postgres + pgvector and index a PDF with bge-m3.
  5. Connect Open WebUI and test the text → image → audio flow.
Questions? Ask your teacher/agent before moving to the next lesson.