1ae22a6135
Engine (c/glm.c): MLA attention with compressed KV, sigmoid noaux_tc router, int8/int4/int2 quant kernels (AVX2), per-layer LRU expert cache + pinned hot-store, batch-union MoE, native MTP speculative decoding (lossless), multi-stop + official chat template, RAM auto-budget from MemAvailable. Tokenizer: byte-level BPE in C. Tooling: coli CLI, disk-safe FP8→int4 converter, tiny-random oracle validation (TF 32/32, greedy 20/20). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
23 lines
724 B
Makefile
23 lines
724 B
Makefile
CC = gcc
|
|
# ARCH=native -> ottimizzato per QUESTA macchina (default, piu' veloce).
|
|
# ARCH=x86-64-v3 -> binario PORTABILE su qualsiasi x86-64 moderno con AVX2 (per distribuire).
|
|
# ARCH=x86-64 -> massima compatibilita' (niente AVX2: usa il path scalare di fallback).
|
|
ARCH ?= native
|
|
CFLAGS = -O3 -march=$(ARCH) -fopenmp -Wall -Wextra -Wno-unused-parameter -Wno-misleading-indentation -Wno-unused-function
|
|
LDFLAGS = -lm -fopenmp
|
|
|
|
all: glm
|
|
|
|
glm: glm.c st.h json.h tok.h tok_unicode.h
|
|
$(CC) $(CFLAGS) glm.c -o glm $(LDFLAGS)
|
|
|
|
olmoe: olmoe.c st.h json.h
|
|
$(CC) $(CFLAGS) olmoe.c -o olmoe $(LDFLAGS)
|
|
|
|
# binario portabile da distribuire su altre macchine x86-64
|
|
portable:
|
|
$(MAKE) glm ARCH=x86-64-v3
|
|
|
|
clean:
|
|
rm -f olmoe glm
|