G2-nano-instruct

A 60.03M-parameter decoder-only language model trained from scratch on a single 8GB NVIDIA Jetson Orin Nano, then instruction-tuned on a 60k English mix. Not an upgrade over G1-nano-instruct. Supervised fine-tuning lowers the 7-task mean versus G2-nano-base. For chat, use G1-nano-instruct.

Overview

G2-nano-instruct is the instruction-tuned version of G2-nano. It is a 60.03M-parameter decoder-only causal language model trained from scratch under an 8GB unified-memory budget (Jetson Orin Nano). Same architecture as G1-nano; pretraining used ~3.00B tokens (2ร— G1).

This checkpoint exists as a lab record: more pretraining tokens, then an SFT mix that did not improve the canonical QCM suite. Qualitative 20-prompt eval was not run. Do not read this card as โ€œG2-nano is the better chat model.โ€

Model variants

The raw pretrained version of the same model is available as G2-nano-base.

What this version adds

Compared with G2-nano-base, this checkpoint adds supervised instruction fine-tuning and chat tokens (<|user|> / <|assistant|> / <|end|> / <|system|>).

SFT was 3 epochs at sequence length 1024 on a 60k English mix. On lm-eval 0.4.11, mean_7 is 40.16% versus 42.13% for the base (โˆ’1.97 pt). Versus G1-nano-instruct, mean_6 is 42.28% vs 43.74% (โˆ’1.46 pt).

Architecture

Llama-style decoder-only transformer, identical to G1-nano / G2-nano-base. Attention is full (no sliding window) at the trained length.

Property Value
Parameters 60.03M
Layers 14
Hidden size 576
Attention GQA, 9 query heads / 1 KV head, head_dim 64
Position encoding RoPE (ฮธ=10000)
Feed-forward network SwiGLU, hidden 1664
Normalization RMSNorm
Context length 2048 tokens native; SFT run at 1024
Vocabulary 16,388 (16,384 SentencePiece + 4 chat tokens)

Training

  • Pretraining data: 3,001,842,523 training tokens
  • Sources: FineWeb-Edu 66% / OpenWebText 15% / PG-19 7.5% / Wikipedia EN 5% / BookCorpus 5% / WikiHow 1.5% (capped)
  • Instruction tuning: 60k English conversations (Claude 4.6, Qwen2.5-72B Magpie, SmolTalk2 Magpie, Llama-3.1-70B everyday, UltraChat, OpenHermes 2.5, Llama 3.3 70B Magpie)
  • Conversation format: mixed single-turn and multi-turn
  • Objective: causal next-token prediction followed by supervised instruction fine-tuning
  • Training hardware: NVIDIA Jetson Orin Nano (8GB unified memory)

Usage

Hugging Face Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "AZERDSQ/G2-nano-instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)

prompt = "<|user|>What is the capital of France?<|end|><|assistant|>"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
    **inputs,
    max_new_tokens=128,
    do_sample=True,
    top_k=50,
    temperature=0.8,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

trust_remote_code=True is required because this repository uses a custom Transformer implementation.

Ollama

ollama run azerdsq/g2-nano-instruct

The chat template is baked in. Prefer azerdsq/g1-nano-instruct for chat.

Benchmarks

Zero-shot, full test sets, lm-evaluation-harness 0.4.11, metric acc.

Task G2-nano-base G2-nano-instruct
LAMBADA (OpenAI) 24.37% 24.72%
PIQA 58.60% 58.71%
WinoGrande 51.46% 50.99%
ARC-Easy 44.11% 39.10%
ARC-Challenge 19.11% 21.25%
HellaSwag 27.36% 27.47%
SciQ 69.90% 58.90%
mean_7 42.13% 40.16%
mean_6 44.59% 42.28%

Versus G1-nano-instruct (mean_6 only; G1-instruct has no HellaSwag in the table):

Task G2-nano-instruct G1-nano-instruct
LAMBADA (OpenAI) 24.72% 23.09%
PIQA 58.71% 60.34%
WinoGrande 50.99% 52.57%
ARC-Easy 39.10% 42.13%
ARC-Challenge 21.25% 20.48%
SciQ 58.90% 63.80%
mean_6 42.28% 43.74%

Largest SFT drops versus G2-nano-base: SciQ โˆ’11.00 pt, ARC-Easy โˆ’5.01 pt. HellaSwag stays near chance (~27%). These tasks are short QCM; they do not measure long context. No 20-prompt qualitative set was scored.

Limitations

  • SFT recedes on the canonical suite; do not prefer this checkpoint over G1-nano-instruct for chat.
  • 60M parameters cap factual retention.
  • 2048-token native context; this SFT run used 1024.
  • English only.
  • Single-sequence generation only (no padded batched inference).

This model should not be used for high-stakes decisions, factual verification, medical advice, legal advice or autonomous actions.

License

Apache 2.0.

Open weights: model weights, tokenizer and inference code (trust_remote_code). Training code, data pipelines and intermediate checkpoints are not included.

Links

Downloads last month
-
Safetensors
Model size
60M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including AZERDSQ/G2-nano-instruct