Qwen3-0.6B inference (12 KB), bare-metal bootable OS (22 KB), and from-scratch Mini-GPT trainer with live Braille TUI (32 KB) in 100% pure x86-64 NASM assembly. Zero C, zero libc, zero dependencies.
#pragma once
#include "types.h"
#include "llm_engine.h"
#define R1_MAX_CPUS 32
int r1_smp_init(int max_cpus);
int r1_smp_num_cpus(void);
void r1_smp_dispatch(R1ParallelFn fn, void *ctx);
extern void enable_avx2_cpu(void);
extern void xsave_state(void *buf_64aligned);
extern void xrstor_state(const void *buf_64aligned);
extern uint64_t get_xcr0(void);
extern void set_xcr0(uint64_t v);