robot_lab 0.2.7 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.envrc +6 -2
- data/.loki +5 -0
- data/Archspec.rb +44 -0
- data/CHANGELOG.md +70 -1
- data/CLAUDE.md +4 -2
- data/README.md +15 -17
- data/Rakefile +6 -111
- data/_typos.toml +21 -0
- data/docs/api/index.md +2 -2
- data/docs/api/skills.md +53 -149
- data/docs/api/support.md +1 -1
- data/docs/architecture/core-concepts.md +1 -1
- data/docs/architecture/index.md +5 -4
- data/docs/architecture/state-management.md +4 -4
- data/docs/concepts.md +1 -1
- data/docs/getting-started/configuration.md +4 -1
- data/docs/getting-started/installation.md +1 -4
- data/docs/guides/hooks.md +122 -0
- data/docs/guides/memory.md +2 -2
- data/docs/guides/using-tools.md +10 -1
- data/examples/.envrc +2 -0
- data/examples/02_tools.rb +8 -8
- data/examples/03_network.rb +1 -1
- data/examples/04_mcp.rb +7 -5
- data/examples/08_llm_config.rb +5 -5
- data/examples/09_chaining.rb +3 -3
- data/examples/14_rusty_circuit/comic.rb +8 -8
- data/examples/14_rusty_circuit/scout.rb +4 -4
- data/examples/15_memory_network_and_bus/README.md +66 -0
- data/examples/15_memory_network_and_bus/output/combined_article.md +5 -7
- data/examples/15_memory_network_and_bus/output/final_article.md +5 -10
- data/examples/15_memory_network_and_bus/output/linux_draft.md +3 -3
- data/examples/15_memory_network_and_bus/output/mac_draft.md +3 -3
- data/examples/15_memory_network_and_bus/output/memory.json +6 -6
- data/examples/15_memory_network_and_bus/output/revision_1.md +21 -10
- data/examples/15_memory_network_and_bus/output/revision_2.md +43 -6
- data/examples/15_memory_network_and_bus/output/revision_3.md +8 -0
- data/examples/15_memory_network_and_bus/output/windows_draft.md +3 -3
- data/examples/16_writers_room/tools.rb +14 -14
- data/examples/19_token_tracking.rb +2 -2
- data/examples/20_circuit_breaker.rb +3 -3
- data/examples/22_context_compression.rb +1 -1
- data/examples/27_incident_response/README.md +65 -0
- data/examples/28_mcp_discovery.rb +2 -2
- data/examples/29_ractor_tools.rb +4 -4
- data/examples/30_ractor_network.rb +2 -2
- data/examples/33_stock_predictor.rb +8 -8
- data/examples/35_hooks.rb +3 -3
- data/examples/README.md +17 -0
- data/examples/common.rb +55 -23
- data/examples/run_all.rb +60 -0
- data/lib/robot_lab/agent_skill_catalog.rb +1 -0
- data/lib/robot_lab/ask_user.rb +5 -3
- data/lib/robot_lab/bus_poller.rb +2 -0
- data/lib/robot_lab/capabilities.rb +4 -0
- data/lib/robot_lab/config/defaults.yml +5 -5
- data/lib/robot_lab/config.rb +10 -2
- data/lib/robot_lab/doom_loop_detector.rb +6 -3
- data/lib/robot_lab/history_compressor.rb +5 -0
- data/lib/robot_lab/hook.rb +1 -0
- data/lib/robot_lab/hook_context.rb +4 -0
- data/lib/robot_lab/hook_registry.rb +1 -0
- data/lib/robot_lab/hooks.rb +6 -3
- data/lib/robot_lab/mcp/client.rb +2 -2
- data/lib/robot_lab/mcp/connection_poller.rb +16 -8
- data/lib/robot_lab/mcp/server_discovery.rb +1 -0
- data/lib/robot_lab/mcp/transports/sse.rb +3 -0
- data/lib/robot_lab/mcp/transports/stdio.rb +5 -0
- data/lib/robot_lab/mcp/transports/streamable_http.rb +5 -3
- data/lib/robot_lab/mcp/transports/websocket.rb +3 -0
- data/lib/robot_lab/memory.rb +39 -13
- data/lib/robot_lab/memory_change.rb +1 -0
- data/lib/robot_lab/message.rb +3 -0
- data/lib/robot_lab/names.rb +2 -4
- data/lib/robot_lab/network.rb +13 -6
- data/lib/robot_lab/robot/agent_skill_matching.rb +2 -0
- data/lib/robot_lab/robot/bus_messaging.rb +3 -0
- data/lib/robot_lab/robot/history_search.rb +2 -0
- data/lib/robot_lab/robot/hooking.rb +29 -0
- data/lib/robot_lab/robot/mcp_management.rb +11 -3
- data/lib/robot_lab/robot/result_building.rb +119 -0
- data/lib/robot_lab/robot/template_rendering.rb +13 -4
- data/lib/robot_lab/robot.rb +88 -130
- data/lib/robot_lab/robot_result.rb +3 -0
- data/lib/robot_lab/run_config.rb +57 -20
- data/lib/robot_lab/script_tool.rb +20 -39
- data/lib/robot_lab/state_proxy.rb +1 -0
- data/lib/robot_lab/streaming/context.rb +1 -0
- data/lib/robot_lab/streaming/events.rb +1 -0
- data/lib/robot_lab/task.rb +2 -0
- data/lib/robot_lab/tool.rb +11 -12
- data/lib/robot_lab/user_message.rb +1 -0
- data/lib/robot_lab/utils.rb +2 -0
- data/lib/robot_lab/version.rb +1 -1
- data/lib/robot_lab/waiter.rb +3 -0
- data/lib/robot_lab.rb +9 -6
- metadata +23 -32
- data/lib/robot_lab/sandbox/null.rb +0 -13
- data/lib/robot_lab/sandbox/seatbelt.rb +0 -104
- data/lib/robot_lab/sandbox.rb +0 -52
data/examples/08_llm_config.rb
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
# Environment is determined by ROBOT_LAB_ENV, RAILS_ENV, or RACK_ENV.
|
|
21
21
|
#
|
|
22
22
|
# Environment variable examples:
|
|
23
|
-
# ROBOT_LAB_RUBY_LLM__MODEL=qwen3.
|
|
23
|
+
# ROBOT_LAB_RUBY_LLM__MODEL=qwen/qwen3.8-27b
|
|
24
24
|
# ROBOT_LAB_RUBY_LLM__REQUEST_TIMEOUT=180
|
|
25
|
-
#
|
|
25
|
+
# LMS_API_BASE=http://localhost:1234/v1
|
|
26
26
|
#
|
|
27
27
|
# Usage:
|
|
28
28
|
# ruby examples/08_llm_config.rb
|
|
@@ -63,7 +63,7 @@ puts " max_retries: #{config.ruby_llm.max_retries}"
|
|
|
63
63
|
puts " log_level: #{config.ruby_llm.log_level}"
|
|
64
64
|
|
|
65
65
|
# Show where the LLM traffic actually goes
|
|
66
|
-
puts "
|
|
66
|
+
puts " lms_api_base: #{LMS_API_BASE}"
|
|
67
67
|
puts " (local inference — no API key in play)"
|
|
68
68
|
puts
|
|
69
69
|
|
|
@@ -92,7 +92,7 @@ shared = RobotLab::RunConfig.new(model: LLM[:default].model, temperature: 0.5)
|
|
|
92
92
|
puts " shared = RunConfig.new(model: #{LLM[:default].model.inspect}, temperature: 0.5)"
|
|
93
93
|
puts " shared.to_h => #{shared.to_h.inspect}"
|
|
94
94
|
puts
|
|
95
|
-
puts " Note: RunConfig carries no `provider` field, so an
|
|
95
|
+
puts " Note: RunConfig carries no `provider` field, so an LM Studio model still"
|
|
96
96
|
puts " needs provider: passed to each robot alongside the shared config."
|
|
97
97
|
puts
|
|
98
98
|
|
|
@@ -153,7 +153,7 @@ puts <<~FOOTER
|
|
|
153
153
|
Example environment variable overrides:
|
|
154
154
|
ROBOT_LAB_RUBY_LLM__MODEL=#{LLM[:default].model}
|
|
155
155
|
ROBOT_LAB_RUBY_LLM__REQUEST_TIMEOUT=180
|
|
156
|
-
|
|
156
|
+
LMS_API_BASE=http://localhost:1234/v1
|
|
157
157
|
|
|
158
158
|
Try running with different environments:
|
|
159
159
|
ROBOT_LAB_ENV=test ruby examples/08_llm_config.rb
|
data/examples/09_chaining.rb
CHANGED
|
@@ -233,9 +233,9 @@ interactive.output = output
|
|
|
233
233
|
interactive.input = StringIO.new("2\n")
|
|
234
234
|
|
|
235
235
|
result = demo_tool.call(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
question: "What type of task should I optimize for?",
|
|
237
|
+
choices: %w[general analysis creative coding research],
|
|
238
|
+
default: "general"
|
|
239
239
|
)
|
|
240
240
|
|
|
241
241
|
puts output.string
|
|
@@ -11,8 +11,8 @@ class ReinventStyle < RobotLab::Tool
|
|
|
11
11
|
"Be bold — try something totally different. " \
|
|
12
12
|
"The new style takes effect on your next bit."
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
parameter :new_persona, type: "string",
|
|
15
|
+
description: "Your new comedy persona, style, and approach. " \
|
|
16
16
|
"Be specific: what kind of humor, what voice, what attitude."
|
|
17
17
|
|
|
18
18
|
def execute(new_persona:)
|
|
@@ -29,10 +29,10 @@ class AdjustEnergy < RobotLab::Tool
|
|
|
29
29
|
"Higher (0.8-1.0) = wilder, riskier, more unpredictable. " \
|
|
30
30
|
"Lower (0.2-0.4) = tighter, more controlled, precise."
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
parameter :level, type: "number",
|
|
33
|
+
description: "Energy level from 0.1 (very controlled) to 1.0 (unhinged)"
|
|
34
|
+
parameter :reason, type: "string",
|
|
35
|
+
description: "Why you're adjusting", required: false
|
|
36
36
|
|
|
37
37
|
def execute(level:, reason: "tactical adjustment")
|
|
38
38
|
clamped = [[level.to_f, 0.1].max, 1.0].min
|
|
@@ -47,8 +47,8 @@ class GetCoaching < RobotLab::Tool
|
|
|
47
47
|
"Use when you're struggling with the crowd and need " \
|
|
48
48
|
"an outside perspective on what to try next."
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
parameter :situation, type: "string",
|
|
51
|
+
description: "Describe what's happening and what you need help with"
|
|
52
52
|
|
|
53
53
|
def execute(situation:)
|
|
54
54
|
@coaches ||= {}
|
|
@@ -10,8 +10,8 @@ class RecruitAnalyst < RobotLab::Tool
|
|
|
10
10
|
"of the comedian's performance. The analyst will " \
|
|
11
11
|
"review your accumulated notes and provide insight."
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
parameter :specialty, type: "string",
|
|
14
|
+
description: "What to analyze: timing, crowd_work, " \
|
|
15
15
|
"originality, adaptability, stage_presence, " \
|
|
16
16
|
"material_evolution"
|
|
17
17
|
|
|
@@ -46,8 +46,8 @@ class RefineCriteria < RobotLab::Tool
|
|
|
46
46
|
"important qualities aren't what you initially expected. " \
|
|
47
47
|
"The update takes effect on your next evaluation."
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
parameter :updated_criteria, type: "string",
|
|
50
|
+
description: "Your refined evaluation criteria and focus areas"
|
|
51
51
|
|
|
52
52
|
def execute(updated_criteria:)
|
|
53
53
|
robot.pending_criteria = updated_criteria
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Example 15: OS Research Editorial Pipeline
|
|
2
|
+
|
|
3
|
+
A multi-robot editorial pipeline that showcases RobotLab's three coordination
|
|
4
|
+
mechanisms — **Network**, **Memory**, and **Bus** — plus dynamic robot
|
|
5
|
+
creation with **spawn()**, all in one demo.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
Three writer robots each advocate for a different operating system (macOS,
|
|
10
|
+
Windows, Linux/BSD) as the base for a home AI research lab:
|
|
11
|
+
|
|
12
|
+
1. **Phase 1 — Writing pipeline (Network + Memory + Spawn).** The network runs
|
|
13
|
+
the three writers in parallel; each stores its draft in shared memory
|
|
14
|
+
(`:mac_draft`, `:windows_draft`, `:linux_draft`). The Linux writer first
|
|
15
|
+
`spawn()`s distro specialists and folds their analyses into its draft. An
|
|
16
|
+
editor robot then synthesizes the drafts into one combined article.
|
|
17
|
+
2. **Phase 2 — Editorial review (Bus).** An editor-in-chief robot lives
|
|
18
|
+
*outside* the network and talks to the editor only over the message bus.
|
|
19
|
+
It reviews the article and replies `APPROVED` or `REVISE: <feedback>`,
|
|
20
|
+
looping until approval or `MAX_REVISIONS` (3) is reached.
|
|
21
|
+
|
|
22
|
+
The demo is lightly interactive: at startup an `AskUser` prompt asks for the
|
|
23
|
+
article's research focus. Press Enter to accept the default ("LLM
|
|
24
|
+
fine-tuning, image generation, and local inference").
|
|
25
|
+
|
|
26
|
+
## How to run
|
|
27
|
+
|
|
28
|
+
From the gem root (an LM Studio server must be running — `lms server start`;
|
|
29
|
+
see `examples/common.rb` for the provider/model configuration):
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bundle exec ruby examples/15_memory_network_and_bus/editorial_pipeline.rb
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Note that `examples/run_all.rb` does **not** include this demo — it only runs
|
|
36
|
+
the top-level `NN_*.rb` files, so run it explicitly as above.
|
|
37
|
+
|
|
38
|
+
This is one of the heavier examples (roughly 20-30 LLM calls). On the default
|
|
39
|
+
model expect a long run; `LLM_PROFILE=small` trades answer quality for a much
|
|
40
|
+
shorter one:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
LLM_PROFILE=small bundle exec ruby examples/15_memory_network_and_bus/editorial_pipeline.rb
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Output
|
|
47
|
+
|
|
48
|
+
Everything lands in `output/`:
|
|
49
|
+
|
|
50
|
+
| File | Content |
|
|
51
|
+
|------|---------|
|
|
52
|
+
| `mac_draft.md`, `windows_draft.md`, `linux_draft.md` | each writer's advocacy draft |
|
|
53
|
+
| `combined_article.md` | the editor's synthesis of the three drafts |
|
|
54
|
+
| `revision_N.md` | one file per bus-driven revision round |
|
|
55
|
+
| `final_article.md` | the approved article (header notes APPROVED or NOT APPROVED) |
|
|
56
|
+
| `memory.json` | dump of the shared memory at the end of the run |
|
|
57
|
+
|
|
58
|
+
## Files
|
|
59
|
+
|
|
60
|
+
- `editorial_pipeline.rb` — entry point; builds the robots, network, and bus, then runs both phases
|
|
61
|
+
- `os_writer.rb` — base writer; runs the LLM and stores its draft in shared memory
|
|
62
|
+
- `linux_writer.rb` — extends `OsWriter`; spawns distro specialists before drafting
|
|
63
|
+
- `os_editor.rb` — synthesizes drafts; handles revision requests from the bus
|
|
64
|
+
- `editor_in_chief.rb` — bus-only reviewer; approves or requests revisions
|
|
65
|
+
- `prompts/` — templates for the writers (`os_advocate.md`), editor, and chief
|
|
66
|
+
- `.envrc` — sets `ROBOT_LAB_TEMPLATE_PATH` to `prompts/` for direnv users (the script sets the same fallback itself, so direnv is optional)
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
# Combined Article (Editor Draft)
|
|
2
2
|
|
|
3
|
-
For a home AI research lab, the operating-system
|
|
3
|
+
For a home AI research lab, the operating-system question is less about which platform is “best” in the abstract and more about which one best fits the workloads, hardware, and maintenance appetite you actually have. macOS, Windows, and Linux/BSD all offer credible paths into local LLM inference, fine-tuning, and image generation, but they optimize for different priorities. Apple Silicon Macs emphasize integrated memory, efficiency, and ease of use. Windows emphasizes broad hardware support and NVIDIA compatibility with a familiar desktop environment. Linux emphasizes direct control, reproducibility, and server-grade workflows. A strong home lab should therefore be built around the OS that matches the intended balance of local experimentation, daily usability, and long-term maintainability.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
macOS is especially compelling when the goal is a compact, low-noise, local-first lab rather than a maximum-throughput training server. High-memory Apple Silicon machines can run quantized open-weight models, embedding pipelines, RAG systems, and image-generation workflows with a level of convenience that is hard to match on a separate GPU workstation. Tools such as MLX, MLX-LM, llama.cpp, Ollama, LM Studio, PyTorch MPS, and Hugging Face’s local inference stack have made Apple Silicon far more capable for practical AI experimentation than earlier generations of Macs. The platform’s strengths are its unified memory architecture, Unix-based developer environment, strong power efficiency, and the ability to keep a powerful local server in a small space without the noise and heat of a traditional GPU rig. Its limitations are equally clear: it does not run NVIDIA CUDA, it is less flexible for large-scale training workloads, and the cost of high-memory configurations can be substantial. macOS is therefore best suited to solo researchers and small teams whose primary needs are local inference, prototyping, evaluation, embeddings, and efficient fine-tuning rather than large multi-GPU training.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Windows offers the broadest practical hardware foundation for many home labs, particularly when NVIDIA GPUs are involved. Its advantage is not merely that it supports CUDA natively, but that it pairs that support with a mature consumer ecosystem and WSL2, which gives access to a near-native Linux environment for tools, containers, and workflows that expect a Linux userspace. That combination allows a home researcher to use Visual Studio Code, Docker Desktop, PyTorch, Hugging Face, TensorBoard, Ollama, llama.cpp, and ComfyUI-style image-generation pipelines while retaining a familiar desktop operating system. Windows also supports a wider range of consumer and workstation GPUs than macOS, and with DirectML, ONNX Runtime, and OpenVINO it can accommodate AMD and Intel acceleration when needed. Its trade-offs are that driver and hardware fragmentation can create more debugging complexity, and WSL2, while excellent, is still an abstraction layer that occasionally complicates containerized or GPU-dependent workflows. Windows is therefore a strong choice for users who want the greatest hardware flexibility, especially when building a high-VRAM local lab around NVIDIA GPUs while still having access to Linux-based tooling.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Linux and BSD are the most natural foundations for a serious, reproducible home research environment. They offer direct control over drivers, kernel settings, container runtimes, and ML frameworks, which is valuable when running multiple workloads such as LLM inference, fine-tuning, image generation, and long-running services on the same machine. Ubuntu, Debian, and Fedora provide mature paths for CUDA, PyTorch, Docker, Podman, vLLM, llama.cpp, Stable Diffusion, and ComfyUI, while FreeBSD can add meaningful value for data integrity, snapshots, and isolated workloads. The main drawback is that Linux generally demands more setup, maintenance, and troubleshooting than macOS or Windows. Driver issues, kernel updates, and container configuration are more visible, and the experience is less turnkey for users who prefer a consumer desktop. For that reason, Linux is best suited to researchers who value control, reproducibility, and a server-like environment over maximum convenience.
|
|
10
10
|
|
|
11
|
-
The
|
|
12
|
-
|
|
13
|
-
My recommendation is nuanced but clear: for most serious home AI labs, Linux is the best long-term platform, with Ubuntu, Debian, or Fedora the safest bets. Windows is the best choice for users who want top consumer GPU performance with less lifestyle disruption, especially on a single versatile workstation. macOS is the best choice for researchers who prioritize stability, efficiency, and a tightly integrated system over absolute training performance. In other words, choose Linux for infrastructure fidelity, Windows for GPU-driven versatility, and macOS for elegant, low-maintenance local experimentation.
|
|
11
|
+
The clearest recommendation is to choose the operating system that matches the primary use case of the lab. If the priority is a quiet, efficient, low-maintenance environment for local inference, embeddings, RAG, and modest fine-tuning, macOS on Apple Silicon is an excellent choice. If the priority is maximum GPU flexibility, especially with NVIDIA hardware, and the user wants a familiar desktop with access to both native Windows tools and Linux-based workflows, Windows with WSL2 is likely the most practical all-round option. If the lab will run multiple long-lived services, containerized experiments, and demanding local workloads, Linux is the strongest foundation, with FreeBSD a valuable companion for storage isolation and data protection. In practice, the best home AI lab is not the one built on the most ideological platform, but the one whose operating system best aligns with the hardware, workflow, and maintenance model the researcher can sustain over time.
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
# Final Article — APPROVED
|
|
1
|
+
# Final Article — NOT APPROVED (max revisions reached)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Choosing an Operating System for a Home AI Research Lab**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A home AI research lab is no longer a single-purpose machine; it is usually a mixed environment for LLM inference, fine-tuning, embeddings, RAG pipelines, image generation, and long-running experiments. That makes the operating-system decision less about ideology and more about where the workload, hardware, and maintenance burden intersect. macOS, Windows, and Linux/BSD are all credible choices, but they optimize for different strengths: Apple Silicon efficiency and unified memory, Windows breadth and NVIDIA compatibility, or Linux control, containerization, and reproducibility.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Ease of use depends on what kind of friction matters most. macOS is arguably the easiest platform to live with day to day: its Unix base is familiar to developers, hardware support is consistent, and driver management is rarely a project of its own. Windows is often the easiest starting point for users already comfortable with consumer PC hardware, especially if they want one machine for AI work, productivity, and media-heavy desktop applications; broad driver support and a vast library of community tutorials are significant advantages. Linux demands more initiative up front, but rewards that effort with stronger reproducibility, better remote-management habits, and closer alignment with cloud and lab environments. BSD, for its part, is better understood as a specialist foundation for storage and isolation than as a mainstream AI-compute platform.
|
|
10
|
-
|
|
11
|
-
The practical recommendation depends on what “home AI lab” means in your case. If your workload is primarily local inference, evaluation, scripting, and moderate fine-tuning, macOS is an excellent fit. If you want a single versatile workstation for image generation, local model serving, and NVIDIA-accelerated experimentation—with access to Linux tooling when needed—Windows is highly compelling. If your priority is full training compatibility, containerized workflows, remote operation, or a setup that mirrors production and rented GPU environments, Linux is the strongest foundation.
|
|
12
|
-
|
|
13
|
-
For most serious home AI labs, Linux is the best long-term choice, especially Ubuntu, Debian, or Fedora, because it aligns most directly with how contemporary AI systems are built and run. Windows is the best fit for users who want top consumer GPU performance with fewer lifestyle compromises, particularly on a single all-purpose workstation. macOS is the best option for researchers who value stability, efficiency, and a tightly integrated experience over maximum training flexibility. Put simply: choose Linux for infrastructure fidelity, Windows for GPU-driven versatility, and macOS for elegant, low-maintenance local experimentation.
|
|
7
|
+
**macOS: the efficient, low-maintenance local-inference platform**
|
|
8
|
+
macOS is strongest when the home lab prioritizes quiet operation, low power draw, and a polished developer environment. Apple Silicon’s unified memory architecture is the key advantage: a 64GB Mac can run 7B, 13B, and many 30B-class quantized models comfortably, and can handle 70B-class Q4/Q5 models with reduced context or partial offload, while a 128GB machine becomes a much more practical platform for larger local inference work. The software stack has also matured: PyTorch MPS, MLX, MLX-LM, llama.cpp, Ollama, LM Studio, Hugging Face Transformers, and parameter-efficient fine-tuning tools give Apple a credible path into LLM experimentation, while Stable Diffusion, SDXL, and local image-generation workflows are increasingly usable through Metal, Core ML, and MLX backends. The tradeoffs are cost and hardware flexibility. A 64GB Apple Silicon machine may cost roughly $2,000–$4,500 depending on chassis, and 128GB configurations can reach $5,500–$8
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# linux_writer Draft
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
For a home AI research lab, Linux is the most practical foundation because it gives you direct control over the exact stack that matters most: GPUs, drivers, containers, and ML frameworks. Whether you choose Ubuntu/Debian for its mature apt ecosystem or Fedora for newer kernels and tooling, you get first-class support for CUDA, cuDNN, PyTorch, and the container runtimes that modern AI workflows depend on. That means you can move cleanly from local inference with Ollama, vLLM, or llama.cpp to LLM fine-tuning with PyTorch, Transformers, PEFT, and LoRA-based workflows, then into image generation with Stable Diffusion, ComfyUI, or WebUI-style stacks—all without fighting OS-level abstraction layers. If your goal is rapid experimentation with current hardware, Fedora’s near-latest drivers and strong RHEL-compatible toolchain are especially attractive, while Ubuntu and Debian offer the kind of long-term stability that makes a home lab easy to maintain.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The software ecosystem is another major advantage. Linux is where Docker, Podman, GPU containers, and cluster-oriented tooling are most natural, so you can reproduce environments reliably across machines and experiments. That matters when you are juggling multiple workloads: fine-tuning a 7B or 13B model, running local inference, and serving image-generation pipelines at the same time. You can isolate projects in containers, use SELinux or AppArmor where supported, and keep a clean separation between experimental code, datasets, and long-running services. For a research lab, that repeatability is not a nice-to-have—it is the difference between a hobby setup and a serious system.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Finally, the breadth of community support makes Linux and BSD the safer long-term bet. Ubuntu, Debian, and Fedora have deep documentation, broad driver support, and active communities around AI tooling, so when something breaks, you are not alone. And if you want to go further, FreeBSD adds a genuinely valuable complementary layer: ZFS-backed data integrity, snapshotting, and strong isolation through jails and bhyve can be excellent for protecting datasets, preserving experiment state, and running isolated workloads. In practical terms, the best home lab often uses Linux as the primary training and inference platform, with FreeBSD as a hardened storage and experiment-isolation node—giving you performance, reliability, and data protection in one coherent system.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# mac_writer Draft
|
|
2
2
|
|
|
3
|
-
macOS is
|
|
3
|
+
For a home AI research lab, macOS running on Apple Silicon is one of the most practical platforms you can build around, especially when the workload is LLM fine-tuning, image generation, and local inference. The key advantage is the combination of Apple’s unified memory architecture, Metal Performance Shaders, and a Unix-based developer environment. On a high-memory Mac such as an M3 Max or M4 Max machine with 64–128 GB of unified memory, you can comfortably run quantized 7B, 13B, 30B, and even some 70B-class open-weight models for local inference without relying on a separate CUDA server. That makes macOS ideal for a low-noise, low-power lab that can sit in a closet, office, or bedroom and stay available for experiments, embeddings, RAG pipelines, and model evaluation.
|
|
4
4
|
|
|
5
|
-
The software ecosystem
|
|
5
|
+
The software ecosystem has matured into a real AI research environment. PyTorch’s MPS backend works well with Hugging Face Transformers, Diffusers, Accelerate, and common fine-tuning stacks for LoRA, QLoRA, and parameter-efficient training. For image generation, you can run Stable Diffusion, SDXL, Flux-style pipelines, and local ComfyUI-style workflows with reasonable performance, especially when the model is memory-efficient. For LLMs, tools like LM Studio, Ollama, llama.cpp, MLX, and MLX-LM give you strong local inference options, while MLX is particularly attractive because it is built specifically for Apple Silicon and can make fine-tuning, evaluation, and inference feel native rather than emulated. If you want tighter integration with Apple’s hardware, Core ML and CoreMLTools let you optimize models for on-device and Apple-Silicon deployment, which is useful when you are testing prompts, agents, multimodal models, or local assistants.
|
|
6
6
|
|
|
7
|
-
What makes macOS
|
|
7
|
+
What makes macOS especially compelling for a home lab is the balance between power, usability, and ecosystem support. You get a real Unix terminal, Python toolchains, Homebrew, Docker workflows, VS Code, Jupyter, Ray, Git, and the same command-line culture as a Linux server, but without the hassle of maintaining a separate machine or dealing with Windows driver friction. Apple Silicon Macs are also extremely efficient: they draw far less power than many comparable GPU workstations, run cool and quiet, and can stay on for days running local LLM servers, embedding pipelines, or image-generation experiments. For a solo researcher or small team building a local-first AI lab, macOS offers a credible path to serious fine-tuning, generation, and inference work while keeping the setup compact, fast, and easy to manage.
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"results": [],
|
|
4
4
|
"messages": [],
|
|
5
5
|
"custom": {
|
|
6
|
-
"ubuntu_specialist": "Ubuntu
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"linux_draft": "
|
|
6
|
+
"ubuntu_specialist": "Ubuntu and Debian provide a stable, well-documented apt ecosystem with broad driver and library support, making it easy to install CUDA, cuDNN, PyTorch, and other research tools. Their strong hardware compatibility and long-term updates help keep a home lab reliable and low-maintenance.",
|
|
7
|
+
"fedora_specialist": "Fedora offers near-latest kernels, drivers, and ML tooling while remaining stable, making it well-suited for rapid AI development. Its RHEL compatibility, SELinux hardening, and mature container/cluster tooling give a home lab the security and repeatability needed for serious research.",
|
|
8
|
+
"freebsd_specialist": "FreeBSD’s ZFS integration provides reliable snapshots and data integrity, helping protect valuable research datasets from accidental loss. Its jails and bhyve virtualization make it easy to isolate experiments, and its long-running stability is well suited for home AI research workloads.",
|
|
9
|
+
"windows_draft": "Windows gives a home AI research lab the broadest practical foundation, especially when you need NVIDIA CUDA performance without sacrificing access to Linux-centric tooling. With a native Windows environment, you get first-class NVIDIA driver and CUDA support, making it easy to run PyTorch, Hugging Face Transformers, PEFT/LoRA fine-tuning scripts, TensorBoard, and local inference stacks such as Ollama, llama.cpp, or text-generation-webui. At the same time, WSL2 gives you a near-native Linux userspace with GPU passthrough, so you can work in Ubuntu, Docker, or containerized pipelines while still using Windows-native tools like Visual Studio Code, Windows Terminal, and Docker Desktop. That combination is rare: you get the Linux ecosystem that much of the AI community expects, without being locked out of the desktop experience, hardware compatibility, and driver maturity that Windows still handles best.\n\nFor image generation and local inference, Windows is especially convenient because it supports both CUDA and DirectML paths. If you are using an NVIDIA GPU, you can run Stable Diffusion WebUI, ComfyUI, InvokeAI, or SD.Next with strong CUDA backend support, then move to ONNX Runtime, DirectML, or OpenVINO when you need broader hardware flexibility. For AMD or Intel GPUs, DirectML and ONNX Runtime can still provide a usable local inference stack, while the widest consumer and workstation GPU selection on Windows means you can build a high-VRAM lab without needing a single vendor ecosystem. That matters for a home setup: you can mix high-end NVIDIA cards, consumer accelerators, large local SSDs, and Windows-native management tools while keeping the same machine useful for everyday work.\n\nThe software ecosystem and community support also favor Windows for a hybrid lab workflow. You can develop in Windows-native Python environments, use Miniconda or PyCharm, and run the same CUDA-accelerated PyTorch and Hugging Face workflows that are common in production, while falling back to WSL2 when a package, dataset, or framework expects a Linux environment. The result is a lab that is flexible rather than ideological: CUDA when performance and compatibility are priority one, WSL2 when Linux tooling is expected, DirectML/ONNX when hardware breadth matters, and a large Windows/NVIDIA/Python community to lean on when debugging drivers, VRAM issues, or fine-tuning pipelines. For a home LLM fine-tuning, image generation, and local inference setup, that balance is exactly why Windows is such a strong choice.",
|
|
10
|
+
"mac_draft": "For a home AI research lab, macOS running on Apple Silicon is one of the most practical platforms you can build around, especially when the workload is LLM fine-tuning, image generation, and local inference. The key advantage is the combination of Apple’s unified memory architecture, Metal Performance Shaders, and a Unix-based developer environment. On a high-memory Mac such as an M3 Max or M4 Max machine with 64–128 GB of unified memory, you can comfortably run quantized 7B, 13B, 30B, and even some 70B-class open-weight models for local inference without relying on a separate CUDA server. That makes macOS ideal for a low-noise, low-power lab that can sit in a closet, office, or bedroom and stay available for experiments, embeddings, RAG pipelines, and model evaluation.\n\nThe software ecosystem has matured into a real AI research environment. PyTorch’s MPS backend works well with Hugging Face Transformers, Diffusers, Accelerate, and common fine-tuning stacks for LoRA, QLoRA, and parameter-efficient training. For image generation, you can run Stable Diffusion, SDXL, Flux-style pipelines, and local ComfyUI-style workflows with reasonable performance, especially when the model is memory-efficient. For LLMs, tools like LM Studio, Ollama, llama.cpp, MLX, and MLX-LM give you strong local inference options, while MLX is particularly attractive because it is built specifically for Apple Silicon and can make fine-tuning, evaluation, and inference feel native rather than emulated. If you want tighter integration with Apple’s hardware, Core ML and CoreMLTools let you optimize models for on-device and Apple-Silicon deployment, which is useful when you are testing prompts, agents, multimodal models, or local assistants.\n\nWhat makes macOS especially compelling for a home lab is the balance between power, usability, and ecosystem support. You get a real Unix terminal, Python toolchains, Homebrew, Docker workflows, VS Code, Jupyter, Ray, Git, and the same command-line culture as a Linux server, but without the hassle of maintaining a separate machine or dealing with Windows driver friction. Apple Silicon Macs are also extremely efficient: they draw far less power than many comparable GPU workstations, run cool and quiet, and can stay on for days running local LLM servers, embedding pipelines, or image-generation experiments. For a solo researcher or small team building a local-first AI lab, macOS offers a credible path to serious fine-tuning, generation, and inference work while keeping the setup compact, fast, and easy to manage.",
|
|
11
|
+
"linux_draft": "For a home AI research lab, Linux is the most practical foundation because it gives you direct control over the exact stack that matters most: GPUs, drivers, containers, and ML frameworks. Whether you choose Ubuntu/Debian for its mature apt ecosystem or Fedora for newer kernels and tooling, you get first-class support for CUDA, cuDNN, PyTorch, and the container runtimes that modern AI workflows depend on. That means you can move cleanly from local inference with Ollama, vLLM, or llama.cpp to LLM fine-tuning with PyTorch, Transformers, PEFT, and LoRA-based workflows, then into image generation with Stable Diffusion, ComfyUI, or WebUI-style stacks—all without fighting OS-level abstraction layers. If your goal is rapid experimentation with current hardware, Fedora’s near-latest drivers and strong RHEL-compatible toolchain are especially attractive, while Ubuntu and Debian offer the kind of long-term stability that makes a home lab easy to maintain.\n\nThe software ecosystem is another major advantage. Linux is where Docker, Podman, GPU containers, and cluster-oriented tooling are most natural, so you can reproduce environments reliably across machines and experiments. That matters when you are juggling multiple workloads: fine-tuning a 7B or 13B model, running local inference, and serving image-generation pipelines at the same time. You can isolate projects in containers, use SELinux or AppArmor where supported, and keep a clean separation between experimental code, datasets, and long-running services. For a research lab, that repeatability is not a nice-to-have—it is the difference between a hobby setup and a serious system.\n\nFinally, the breadth of community support makes Linux and BSD the safer long-term bet. Ubuntu, Debian, and Fedora have deep documentation, broad driver support, and active communities around AI tooling, so when something breaks, you are not alone. And if you want to go further, FreeBSD adds a genuinely valuable complementary layer: ZFS-backed data integrity, snapshotting, and strong isolation through jails and bhyve can be excellent for protecting datasets, preserving experiment state, and running isolated workloads. In practical terms, the best home lab often uses Linux as the primary training and inference platform, with FreeBSD as a hardened storage and experiment-isolation node—giving you performance, reliability, and data protection in one coherent system."
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
# Revision 1
|
|
2
2
|
|
|
3
|
-
This is strong
|
|
3
|
+
This is already a strong, balanced article. It meets the brief: it acknowledges each platform, compares them fairly, maps scenarios to OS choices, and ends with a nuanced but clear recommendation. The tone is appropriately editorial rather than advocacy-heavy, and the structure is clean.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A few optional refinements would make it slightly sharper:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1. **Make the cost comparison a little more explicit**
|
|
8
|
+
You mention cost briefly in the macOS paragraph, but the comparison across all three platforms could be slightly more balanced. A small phrase in the introduction or in the Linux paragraph could help, e.g.:
|
|
9
|
+
- macOS: high upfront cost for memory and hardware
|
|
10
|
+
- Windows: broadest cost flexibility across consumer, workstation, and mixed hardware
|
|
11
|
+
- Linux: often lower acquisition cost, but higher maintenance cost
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
2. **Tighten the final recommendation slightly**
|
|
14
|
+
The final paragraph is good, but it could be marginally more decisive while remaining nuanced. For example:
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
> In short: choose macOS if your lab is memory-constrained, low-noise, and Apple-centric; choose Windows if you want the broadest hardware flexibility with a familiar desktop; and choose Linux if you want the most control and reproducibility. For most serious home AI labs, Linux or Windows-with-WSL2 will be the more broadly practical choices, while macOS remains an excellent option when efficiency, simplicity, and local inference are the main priorities.
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
3. **Clarify “Linux/BSD” vs. “FreeBSD”**
|
|
19
|
+
The article currently treats BSD mainly through FreeBSD, which is fine, but a small clarification would make that smoother. For example:
|
|
20
|
+
- “Linux—and, in some cases, BSD—”
|
|
21
|
+
- or keep “Linux/BSD” but specify later that FreeBSD is the most relevant BSD choice for data integrity and isolation.
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
23
|
+
4. **Minor wording polish**
|
|
24
|
+
A few small phrases could be tightened:
|
|
25
|
+
- “maximum-throughput training server” → “large-scale training server”
|
|
26
|
+
- “most practical all-round option” → “most versatile practical option”
|
|
27
|
+
- “strongest foundation” → “strongest foundation for a serious lab”
|
|
28
|
+
|
|
29
|
+
If you want, I can also produce a **tighter final version** of the article with these edits incorporated, or rewrite it in a slightly more **magazine-style editorial voice** versus a **technical blog voice**.
|
|
@@ -1,13 +1,50 @@
|
|
|
1
1
|
# Revision 2
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
User wants revise article. Feedback: previous response was meta-review? Wait they likely mean the article I gave? Actually user says "This is a meta-review, not the article itself. Please submit the actual piece for editorial review. If this text is intended as the final submission, it fails as a publication article because it lacks concrete platform details, technical evidence, and standalone structure. Convert it into an editorial with clear sections for macOS, Windows, and Linux/BSD, include specific cost and technical comparisons, clarify the BSD scope, and end with a decisive recommendation."
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Need produce actual editorial, not meta-review. Clear sections for macOS, Windows, Linux/BSD. Include specific cost and technical comparisons. Clarify BSD scope. End decisive recommendation. Professional editorial voice. Objective. Need likely 4-6 paragraphs? Original brief said 4-6 paragraphs article. Now says clear sections for macOS, Windows, Linux/BSD. Could use headings and sections. Need include concrete details: Apple M4 Max 36/48/64/128GB, $3,999-? M4 Max Base 36GB $3,999? M3 Max 48GB $5,499? Need be accurate but not too exact? We can mention approximate prices. Need avoid false specifics. Let's check known Apple prices: M4 MacBook Pro 14-inch: $1,599 base 16GB/24? M4 Pro 24GB $1,999? M4 Max 36GB $3,999? M4 Max 48GB +$200? M4 Max 128GB +$? Apple Mac mini M4 Pro 24GB $1,399; Mac Studio M4 Max 36GB $1,999, M4 Max 48/64/128? M4 Max 128GB maybe $3,499? Actually Mac Studio M4 Max starts $1,999 36GB, up to 128GB maybe $3,499. MacBook Pro M4 Max 128GB maybe $6,999? Need careful. Could say "a 128 GB Mac Studio or MacBook Pro can cost $3,500–$7,000 or more". Good approximate.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Windows cost: entry 8GB useless; 32GB RAM with RTX 4060 Ti 16GB around $1,500-$2,000; RTX 4090/5090 24/32GB system $4,000-$8,000+. Could say "a practical 32 GB system with a 16 GB RTX card can be built for roughly $1,500–$2,000; a 24/32 GB single-GPU lab often lands in the $4,000–$8,000 range". Good.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Linux cost: same hardware as Windows, no OS license, but maintenance time; used enterprise gear; Fedora/Ubuntu free; FreeBSD free. Specific GPU support: NVIDIA driver, CUDA, cuDNN, PyTorch, vLLM. Need technical evidence: unified memory: Apple can load 70B Q4 in ~40GB? Llama 3.1 70B Q4 ~40GB, fits 64GB. M-series memory bandwidth: M4 Max up to 546GB/s? M3 Max 400GB/s, M4 Max 546GB/s? Apple M4 Max 546GB/s? M3 Ultra 819GB/s. Need mention approximate inference token rates? Could avoid exact. But technical evidence: 64GB unified memory can hold quantized 70B and leave headroom; 128GB can run 123B? Could say "a 64 GB Apple Silicon machine can hold a 70B Q4/Q5 checkpoint with room for KV cache; a 128 GB machine can accommodate larger MoE or 120B-class models." Good.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Windows: WSL2 GPU passthrough, CUDA 12.x, Docker Desktop WSL2 backend; RTX 4060 Ti 16GB can run 13B QLoRA, 70B inference with offload; RTX 4090 24GB for LoRA/QLoRA 13B and local SDXL; 32GB VRAM 5090 for larger. AMD/Intel via DirectML/ONNX/OpenVINO. Mention CUDA libraries, cuBLAS, TensorRT. Cost: flexible.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Linux/BSD: Ubuntu LTS, Fedora, Debian; CUDA, PyTorch, vLLM, SGLang? container isolation; FreeBSD ZFS, jails, bhyve; not typical for CUDA unless NVIDIA FreeBSD? Actually NVIDIA does not officially support FreeBSD for CUDA; important clarify BSD scope: FreeBSD not for primary CUDA training; use for storage, snapshots, VM isolation; Linux for GPU work. Need clarify: BSD scope means primarily FreeBSD as data-isolation/storage node, not CUDA host. That's important.
|
|
14
|
+
|
|
15
|
+
Need sections. Could title. Need decisive recommendation: e.g. "For most home AI research labs, choose Windows with WSL2 if you want maximum practical compatibility and GPU flexibility; choose Linux if you want a serious reproducible lab; choose macOS only if Apple Silicon unified memory and low maintenance are core." But need decisive recommendation singular? "If I had to recommend one default for a home lab that must do inference, fine-tuning, and image generation without over-specializing: Windows with WSL2." Then note Linux for serious, macOS for compact. Or maybe recommend Linux? The sources: Windows broadest, Linux serious. Need decisive but nuanced. Let's pick: "For a typical home AI research lab, start with Windows + WSL2 if you are building around consumer/workstation NVIDIA GPUs and need a usable daily machine. If your lab will run many long-lived services and containerized experiments, move to Linux as primary OS. macOS is the best choice when low noise, efficiency, and unified memory matter more than CUDA." But decisive recommendation? Could say "The best default is Windows with WSL2, with Linux as the more serious alternative." That satisfies.
|
|
16
|
+
|
|
17
|
+
Need include concrete cost and technical comparisons. Need standalone structure.
|
|
18
|
+
|
|
19
|
+
Need ensure 4-6 paragraphs? User says clear sections, likely headings with multiple paragraphs. Could be 6 sections: intro, macOS, Windows, Linux/BSD, recommendation. But original asked 4-6 paragraphs article; now asks clear sections. Could produce headings and 1-2 paragraphs each, total 6-8 paragraphs. That's okay? Need maybe not violate. "Clear sections for macOS, Windows, Linux/BSD" implies headings. We can have 5 sections. Need maybe 4-6 paragraphs overall? Could do 5 paragraphs with headings? Headings not paragraphs. Let's produce title and sections. Each section maybe one or two paragraphs. Need professional editorial voice.
|
|
20
|
+
|
|
21
|
+
Need include concrete platform details and technical evidence. Need avoid overclaiming. Let's draft.
|
|
22
|
+
|
|
23
|
+
Potential final:
|
|
24
|
+
|
|
25
|
+
Title: Choosing an OS for a Home AI Research Lab
|
|
26
|
+
|
|
27
|
+
Intro: A home AI lab is not one workload... The OS choice should be based on memory architecture, GPU path, ecosystem, cost, and maintenance.
|
|
28
|
+
|
|
29
|
+
Section: macOS: unified memory and quiet local inference
|
|
30
|
+
- Apple Silicon M4 Max, 36/48/64/128GB unified memory; $2k-$7k; 64GB can run 70B Q4, 128GB can run larger. MLX, llama.cpp, Ollama, PyTorch MPS, LoRA/QLoRA, Stable Diffusion/ComfyUI; no CUDA, no multi-GPU, high RAM cost, Docker virtualized.
|
|
31
|
+
- Scenario: quiet office/bedroom, local inference, RAG, embeddings, image gen.
|
|
32
|
+
|
|
33
|
+
Section: Windows: CUDA plus a familiar desktop
|
|
34
|
+
- Broad hardware, NVIDIA CUDA native, WSL2 Linux, RTX cards 16/24/32GB. 16GB card for 7B/13B QLoRA/SDXL; 24GB for 13B LoRA/70B offload; 32GB for bigger. DirectML/ONNX for AMD/Intel. Cost $1.5k-$8k+. Easier consumer hardware, drivers. Tradeoffs fragmentation, WSL2 abstraction.
|
|
35
|
+
- Scenario: NVIDIA GPU, mixed use, max hardware flexibility.
|
|
36
|
+
|
|
37
|
+
Section: Linux/BSD: control, reproducibility, and serious services
|
|
38
|
+
- Ubuntu LTS/Debian/Fedora; NVIDIA drivers, CUDA, cuDNN, PyTorch, vLLM, Docker/Podman, vLLM/SGLang? Isolation. Same hardware as Windows but no license; used server gear lower. Maintenance. BSD scope: FreeBSD not CUDA host; use ZFS, jails, bhyve for storage isolation/VMs; Linux primary.
|
|
39
|
+
- Scenario: long-running services, reproducible experiments, data protection.
|
|
40
|
+
|
|
41
|
+
Section: Recommendation
|
|
42
|
+
- Decisive: For most home labs, Windows + WSL2 is best default if using NVIDIA GPUs and want usable machine. If serious multi-service/containerized/reproducible, Linux primary. If low noise and unified memory, macOS. Need maybe rank? "If forced to choose a single default: Windows with WSL2." But also say not for macOS? Need clear.
|
|
43
|
+
|
|
44
|
+
Need perhaps include table? User asks article, not table. Could include a short comparison table? "include specific cost and technical comparisons" maybe table helps. But article with sections. Could include a compact table in final? Editorial could have table. But maybe not. Let's include a small table? It would be clear. But article should be prose. Could include a "At a glance" bullet list. But user wants editorial with clear sections. A table may be okay, but "article" maybe no table. Let's produce prose with specific numbers.
|
|
45
|
+
|
|
46
|
+
Need ensure no unsupported exact token rates. Could include examples: 7B Q4 ~4-5GB, 13B Q4 ~8GB, 70B Q4 ~40GB. That's technical evidence. Need mention KV cache. Good.
|
|
47
|
+
|
|
48
|
+
Need mention cost specifics: Mac Studio M4 Max 36GB $1,999; 64GB +$200? Actually Apple upgrades: 36 to 64 +$200? maybe $2,199. 128GB +$? maybe $3,499. MacBook Pro M4 Max 128GB $6,999. Could say "a 64 GB Mac Studio starts around $2,200, while a 128 GB MacBook Pro can exceed $6,000". Need avoid exact if uncertain. Let's say "roughly $2,000 to $7,000". Good.
|
|
49
|
+
|
|
50
|
+
Windows: "A 16 GB RTX 4060 Ti or 5060 Ti system with 32 GB RAM is often
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Revision 3
|
|
2
|
+
|
|
3
|
+
**Choosing an Operating System for a Home AI Research Lab**
|
|
4
|
+
|
|
5
|
+
A home AI research lab is no longer a single-purpose machine; it is usually a mixed environment for LLM inference, fine-tuning, embeddings, RAG pipelines, image generation, and long-running experiments. That makes the operating-system decision less about ideology and more about where the workload, hardware, and maintenance burden intersect. macOS, Windows, and Linux/BSD are all credible choices, but they optimize for different strengths: Apple Silicon efficiency and unified memory, Windows breadth and NVIDIA compatibility, or Linux control, containerization, and reproducibility.
|
|
6
|
+
|
|
7
|
+
**macOS: the efficient, low-maintenance local-inference platform**
|
|
8
|
+
macOS is strongest when the home lab prioritizes quiet operation, low power draw, and a polished developer environment. Apple Silicon’s unified memory architecture is the key advantage: a 64GB Mac can run 7B, 13B, and many 30B-class quantized models comfortably, and can handle 70B-class Q4/Q5 models with reduced context or partial offload, while a 128GB machine becomes a much more practical platform for larger local inference work. The software stack has also matured: PyTorch MPS, MLX, MLX-LM, llama.cpp, Ollama, LM Studio, Hugging Face Transformers, and parameter-efficient fine-tuning tools give Apple a credible path into LLM experimentation, while Stable Diffusion, SDXL, and local image-generation workflows are increasingly usable through Metal, Core ML, and MLX backends. The tradeoffs are cost and hardware flexibility. A 64GB Apple Silicon machine may cost roughly $2,000–$4,500 depending on chassis, and 128GB configurations can reach $5,500–$8
|