Maple DNA Course

k-mers, tokenization, and sequence windows

How DNA models turn long base strings into tokens and why tokenization affects what the model can learn.

Learning Objectives

What this lesson should make precise

01

Name the core abstraction and its failure modes.

02

Translate the concept into a Maple/Hermon proposal contract.

03

Define at least one evaluation case that can fail the model safely.

Tutorial Flow

How this lesson becomes a demo and training target

Each tutorial is written as a user education path and a model-improvement artifact. The diagram shows how the idea moves into a lab, a typed contract, an eval gate, and then a Hermon/MapleAI demo route.

01

Concept

What a k-mer is

02

Applied Lab

Applied lab: k-mers, tokenization, and sequence windows

03

Output Contract

tokens, k, windowing, tradeoffs

04

Eval Gate

Does the answer separate model proposal from deterministic execution?

05

Demo Route

Maple DNA training and public model checks

01

What a k-mer is

A k-mer is a length-k substring such as ACG, CGT, or GTA. Tokenizing a sequence into k-mers gives the model local context and a vocabulary over short biological patterns.

  • Choose k.
  • Slide or segment windows.
  • Track overlap.

02

Efficiency tradeoff

Larger k can capture richer local patterns but expands vocabulary and can reduce sample efficiency. Smaller k is simpler but may lose motif structure.

  • Vocabulary grows quickly.
  • Overlap adds compute.
  • Task decides the token.

03

DNABERT-2 direction

DNABERT-2 argues that BPE-style tokenization can reduce inefficiency in fixed k-mer tokenization for large genome models. Maple DNA should teach both approaches and route tasks carefully.

  • Compare k-mer and BPE.
  • Document token policy.
  • Evaluate on task families.

Lab

Applied lab: k-mers, tokenization, and sequence windows

Given a DNA-like string, generate 3-mer and 6-mer tokenizations and explain which downstream classifier each representation fits.

Expected result

  • A typed JSON-style proposal rather than free-form advice.
  • Clear authority boundaries and denied operations.
  • A test or rubric that decides whether the proposal is deployable.

Evaluation

How Maple would grade this work

Rubric

  • Does the answer expose assumptions instead of hiding them?
  • Does the answer separate model proposal from deterministic execution?
  • Does the answer produce artifacts that can be tested, reviewed, and rolled back?

Output contract

tokens, k, windowing, tradeoffs, recommended_model_family

Use this lesson as training direction

A strong lesson gives users a mental model and gives Hermon a sharper target for examples, probes, and demo prompts.