Model Genome: Fingerprinting Whether an LLM Was Trained from Scratch or Derived A new open-source tool called Model Genome Korea can determine whether a Korean large language model (LLM) or vision-language model (VLM) was trained from scratch or derived from an open-weight base model, by analyzing the architecture fingerprint from config.json and tokenizer overlap. The tool, applied to nine Korean organizations' public foundation models, found exact architecture matches with Qwen, Llama, and DeepSeek, and identified cases like a model with Qwen2.5-7B architecture but only 0.38 tokenizer overlap, indicating a newly trained Korean tokenizer. The debate intensified after LG released K-EXAONE 2.0 (750B) in late July 2026, with a Zhihu thread exceeding 2.7 million views. 🧬 33 Model Genome Korea DNA lineage test of Korean LLM & VLM foundation models config.json , config + tokenizer remain the primary evidence. We applied the exact same yardstick to the public foundation models of nine Korean organizations. Try it live: Building a large language model on top of an open-weight base Qwen, Llama, DeepSeek, Mistral is a legitimate, industry-standard practice. But it is different from training a foundation model from scratch — and vendors do not always make the distinction explicit. When several labs released DeepSeek-rivaling "self-developed" models in late July 2026 e.g. LG K-EXAONE 2.0, 750B , the debate spilled into Chinese tech communities as well — a Zhihu thread → link https://www.zhihu.com/question/2067512422555029717 crossed 2.7M views. The natural question followed: from scratch, or derived? This is answerable, objectively, from public files. Here is how. config.json Every transformers checkpoint ships a config.json . A handful of fields form a surprisingly discriminative signature: model type vocab size hidden size intermediate size num hidden layers num attention heads / num key value heads python import requests def arch fingerprint repo : c = requests.get f"https://huggingface.co/{repo}/resolve/main/config.json", headers={"User-Agent": "genome/1.0"} .json return {k: c.get k for k in "model type", "vocab size", "hidden size", "intermediate size", "num hidden layers", "num attention heads", "num key value heads" } The shape tuple hidden size, intermediate size, num hidden layers, heads, kv is effectively a fingerprint of the reference architecture. When a model's tuple matches a foreign open-weight exactly , that is strong evidence the architecture was adopted rather than designed independently. Examples we measured: | Model | shape h · i · L · heads · kv | Exact match | |---|---|---| | a 7B commercial model | 3584 · 18944 · 28 · 28 · 4 | Qwen2.5-7B | | a 72B commercial model | 8192 · 29568 · 80 · 64 · 8 | Qwen2.5-72B | | a 14B VLM | 5120 · 17408 · 40 · 40 · 8 | Qwen3-14B | | an 8B model | 4096 · 14336 · 32 · 32 · 8 | Llama-3.1-8B | | a MoE model | 7168 · 18432 · 61 · moe 2048 | DeepSeek-V3 | A single coincidental field means nothing; five simultaneously is a fingerprint. Architecture alone can mislead. A model can copy a foreign architecture but train a genuinely new tokenizer, or vice-versa. The tokenizer is measured directly from tokenizer.json , comparing the vocabulary sets with a min-overlap ratio: python def vocab set repo : j = requests.get f"https://huggingface.co/{repo}/resolve/main/tokenizer.json" .json v = j "model" "vocab" BPE: {token: id} return set v.keys def tok overlap a, b : A, B = vocab set a , vocab set b return len A & B / min len A , len B 1.0 == subset This immediately surfaces things config hides. One model matched Qwen2.5-7B's architecture exactly , yet its tokenizer overlapped Qwen by only ~0.38 — a "foreign brain, own language" case: the architecture was adopted, but a new Korean tokenizer was trained. Conversely, some VLMs reused a base tokenizer verbatim overlap = 1.000 , confirming a straight fine-tune. A practical trap: min |A|,|B| in the denominator not the union is what makes areducedvocabulary that is a strict subset of a larger one score ~1.0 — the correct signal for "carved out of the base." The gold-standard question is: were the weights trained from scratch, or continued-pretrained on a foreign base? This is where two instructive traps live. The naive idea: load embed tokens.weight from both models, and for shared tokens, average the row-wise cosine similarity. If they share lineage, embeddings should be similar. They are not — even when they obviously share lineage . We measured near-zero mean cosine for both a known from-scratch model and a known Llama-derivative. The reason is rotational invariance : a Transformer's hidden space has no privileged basis, so two models can encode identical information under an arbitrary orthogonal rotation. Row-wise cosine sees rotation as dissimilarity. It cannot distinguish lineage. Linear CKA Centered Kernel Alignment is rotation- and isotropic-scale-invariant, so it is the right tool for comparing representations: python import torch def linear cka X, Y : X: n, d1 , Y: n, d2 — SAME token order shared vocab X = X - X.mean 0, keepdim=True Y = Y - Y.mean 0, keepdim=True num = X.T @ Y .norm 2 den = X.T @ X .norm Y.T @ Y .norm return num / den .item A from-scratch model scored near-zero CKA against its candidate base — clean evidence of independent pretraining. But a continued-pretrained derivative scored only modestly higher ≈0.25 — barely above the baseline between two unrelated models of the same family ≈0.21 . Large-scale training reshapes embeddings enough that CKA loses discriminative power on the derivative side. Conclusion, stated honestly: the weights axis reliably confirms from-scratch near-zero , but it is not a strong detector of derivation . For that, config + tokenizer fingerprints remain primary. We report the weights axis as supporting evidence, not as a verdict on its own. Most models declare a single attention mechanism. A few mix several. The count of distinct mechanisms in config.json is a cheap proxy for architectural originality: KEYS = "layer types", "linear attn config", "sliding window", "mamba2 d state", "hyena filter order", "mla kv lora rank", "attention cls" def attention diversity cfg : hits = k for k in KEYS if k in cfg e.g. layer types = full×16, sliding×48 - hybrid 2 return hits In our sweep, most Korean models used a single grouped-query or multi-head-latent attention; a couple used a hybrid layer types = full attention×16, sliding attention×48 ; and the most diverse combined mamba2, hyena, MLA, linear attention, gated-delta-net, native-sparse-attention and sliding-window in one stack. We collapse the two primary axes architecture × weights into one label: | Genotype | Architecture | Weights | |---|---|---| 🟢 Native | self | from-scratch | 🔵 Adapted | mostly self | one axis borrowed | 🟡 Mixed | partial | partial inheritance | 🔴 Ported | foreign exact match | inherited | The tokenizer overlap and attention diversity are shown alongside, not folded into the verdict, so readers can see the raw evidence. Applying the identical pipeline to the public foundation models of nine Korean organizations large enterprises, telcos, mid-size firms, and startups , the picture is not uniform : some models match a foreign architecture and tokenizer exactly Ported ; others use self-built architectures and weights with no foreign match Native ; many sit in between. The per-model breakdown — with a 3D lineage graph, search, and light/dark mode — is in the Space https://huggingface.co/spaces/mayafree/Model-Genome-Korea . The three functions above are the whole method. Point them at any two repos on the Hub: print arch fingerprint "some/model" print tok overlap "some/model", "Qwen/Qwen3-14B" weights: load embed tokens.weight for a shared-vocab pair, then linear cka Live demo, full dataset, and 3-language UI: Model Genome Korea . Model names, companies, and licenses are the property of their respective owners. DNA lineage test of Korean LLM & VLM foundation models