NightRun — İşletim Sistemi Olmadan LLM Çalıştırmak: UEFI Üzerinden Doğrudan AI Çıkarımı / NightRun — Running an LLM Without an OS: Direct AI Inference Over UEFI


:türkiye: Genel Bakış

SBC veya mini PC üzerinde LLM çalıştırmak verilerinizi gizli tutmanın iyi bir yolu — ama bu yöntemler genellikle işletim sistemi gerektiriyor ve bu da sistem belleğinin önemli bir kısmını tüketiyor. NightRun, bu sorunu çözmeye yönelik deneysel bir açık kaynak proje. USB sürücüsünden veya microSD karttan doğrudan yerel bir LLM’e önyükleme yapıyor; geleneksel bir işletim sistemi yüklemiyor.

NightRun bir Linux dağıtımı değil

NightRun’ı belleği korumak için tasarlanmış sadeleştirilmiş bir Linux dağıtımı olarak düşünmek kolay ama durum hiç de öyle değil. NightRun bir UEFI uygulaması — geleneksel bir işletim sistemi olmadan çalışıyor. Altında Linux çekirdeği, zamanlayıcı veya ağ katmanı yok. Bunun yerine klavye girişi, ekran framebuffer yönetimi, depolama erişimi ve Raspberry Pi 5 soğutma fanı kontrolü için doğrudan UEFI Boot Services kullanıyor.

Temel Özellikler

  • Donanım Desteği: 64-bit x86_64 UEFI PC’ler (Secure Boot kapalı) ve Raspberry Pi 5 — USB veya microSD üzerinden
  • Desteklenen Modeller:
    • Llama 3.2 1B (4GB RAM gerektirir)
    • Llama 3.2 3B ve Granite 4.1 3B (6GB RAM)
    • Qwen3 4B Instruct 2507 (8GB RAM)
    • Modeller .nrm formatına dönüştürülüyor
  • Optimize Çıkarım: x86’da AVX2/FMA/F16C çekirdekleri, Raspberry Pi’de NEON çekirdekleri
  • Sıfır Kopya Tasarım: Q8_0, Q4_K ve Q6_K modellerini dequantization yapmadan doğrudan RAM’den çalıştırıyor
  • Dahili Arayüz: Canlı istatistikler, prompt düzenleme ve konuşma geçmişiyle framebuffer chat arayüzü

Güvenlik Yaklaşımı

Model yüklendikten sonra depolama “mühürleniyor” — diskten herhangi bir okuma girişimi donanım hatası (hard fault) tetikliyor. Bu tasarım, model yüklendikten sonra depolama ortamının tamamen devre dışı bırakılmasını sağlıyor.

Performans

Geliştirici ekibine göre kod çözme hızı ağırlıklı olarak bellek bant genişliğiyle sınırlanıyor. 8 çekirdekli x86 QEMU sanal makinesinde Llama 3.2 1B (Q8_0) kod çözme sırasında saniyede yaklaşık 20 token üretiyor. 8GB Raspberry Pi 5’te ise Granite 4.1 3B (Q4_K_M) erken NEON çekirdekleriyle saniyede yaklaşık 3.0 token üretiyor.

Kurulum

Kurulum bir Linux shell scriptiyle gerçekleştiriliyor — doğrulanmış modeli indirip önyüklenebilir imajı flash ediyor. Kaza eseri sistem sürücüsünün üzerine yazılmasını önlemek için kullanıcının açıkça /dev/sdX yazması gerekiyor.

Açık Kaynak

Projenin büyük çoğunluğu Claude Code ile Fable 5 modeli kullanılarak yazıldı. MIT lisansıyla GitHub’da yayınlandı.


:united_kingdom: Overview

Running LLMs locally on an SBC or mini PC is a good way to keep data private — but these setups typically require a conventional operating system, which consumes a significant portion of system memory. NightRun is an experimental open-source project that addresses this by booting a machine directly into a local LLM from a USB drive or microSD card, without loading a conventional OS.

NightRun Is Not a Linux Distribution

It might be easy to think NightRun is a stripped-down Linux distribution designed to save memory — but that’s not the case. NightRun is a UEFI application that runs without a conventional operating system. There is no Linux kernel, scheduler, or network stack underneath. Instead, it relies on UEFI Boot Services to handle keyboard input, drive the display framebuffer, access storage, and control the Raspberry Pi 5 cooling fan directly.

Key Features

  • Hardware Support: 64-bit x86_64 UEFI PCs (Secure Boot disabled) and Raspberry Pi 5 — via USB or microSD
  • Supported Models:
    • Llama 3.2 1B (requires 4GB RAM)
    • Llama 3.2 3B and Granite 4.1 3B (6GB RAM)
    • Qwen3 4B Instruct 2507 (8GB RAM)
    • Models converted to the .nrm format
  • Optimized Inference: AVX2/FMA/F16C kernels on x86; NEON kernels on Raspberry Pi
  • Zero-Copy Design: Runs quantized Q8_0, Q4_K, and Q6_K models directly from RAM without dequantization
  • Built-in UI: Framebuffer chat interface with live stats, prompt editing, and conversation history

Security Design

After the model is loaded, storage is “sealed” — any subsequent attempt to read from the disk triggers a hard fault. This design ensures the storage medium is completely isolated after model load.

Performance

Decoding speed is primarily limited by memory bandwidth. On an 8-core x86 QEMU VM, Llama 3.2 1B (Q8_0) reaches around 20 tokens/second during decoding. On a real 8GB Raspberry Pi 5, Granite 4.1 3B (Q4_K_M) generates approximately 3.0 tokens/second using the early pre-sdot NEON kernels.

Installation

Installation is handled by a Linux shell script that downloads a verified model and flashes the bootable image. Safety checks require the user to explicitly type FLASH /dev/sdX to prevent accidental overwriting of system drives.

Open Source

The majority of NightRun’s code was written using Claude Code with the Fable 5 model. Released under the MIT license on GitHub.

:open_book: Full article: NightRun UEFI application boots a local LLM on Raspberry Pi 5 and x86 PCs without an OS - CNX Software
:globe_with_meridians: Website: https://nightrun.io/
:laptop: GitHub: GitHub - hardrave/NIGHTRUN: Boot your PC straight into an LLM. Rust, UEFI-resident, no operating system underneath. · GitHub

2 Likes