Zedev-V2 / README.md
dragosMediv's picture
Upload Zedev-V2 base (82.14M Loop Transformer)
fcfb990 verified
|
Raw History Blame Contribute Delete
4.47 kB
metadata
license: apache-2.0
language:
  - en
tags:
  - zedev
  - loop-transformer
  - causal-lm
  - base-model
  - text-generation
  - small-language-model
  - custom_code
library_name: transformers
pipeline_tag: text-generation
model-index:
  - name: Zedev-V2
    results:
      - task:
          type: text-generation
          name: Text Generation
        dataset:
          name: ARC-Challenge
          type: ai2_arc
          config: ARC-Challenge
        metrics:
          - name: Accuracy
            type: acc
            value: 23.29
          - name: Normalized Accuracy
            type: acc_norm
            value: 24.83
        source:
          name: lm-eval
          url: https://github.com/EleutherAI/lm-evaluation-harness
      - task:
          type: text-generation
          name: Text Generation
        dataset:
          name: ARC-Easy
          type: ai2_arc
          config: ARC-Easy
        metrics:
          - name: Accuracy
            type: acc
            value: 52.69
          - name: Normalized Accuracy
            type: acc_norm
            value: 46.34
        source:
          name: lm-eval
          url: https://github.com/EleutherAI/lm-evaluation-harness
      - task:
          type: text-generation
          name: Text Generation
        dataset:
          name: BoolQ
          type: boolq
        metrics:
          - name: Accuracy
            type: acc
            value: 59.69
        source:
          name: lm-eval
          url: https://github.com/EleutherAI/lm-evaluation-harness
      - task:
          type: text-generation
          name: Text Generation
        dataset:
          name: OpenBookQA
          type: openbookqa
        metrics:
          - name: Accuracy
            type: acc
            value: 19.4
          - name: Normalized Accuracy
            type: acc_norm
            value: 30.4
        source:
          name: lm-eval
          url: https://github.com/EleutherAI/lm-evaluation-harness
      - task:
          type: text-generation
          name: Text Generation
        dataset:
          name: SciQ
          type: sciq
        metrics:
          - name: Accuracy
            type: acc
            value: 76.8
          - name: Normalized Accuracy
            type: acc_norm
            value: 66.9
        source:
          name: lm-eval
          url: https://github.com/EleutherAI/lm-evaluation-harness
      - task:
          type: text-generation
          name: Text Generation
        dataset:
          name: WikiText-2
          type: wikitext
        metrics:
          - name: Word Perplexity
            type: word_perplexity
            value: 30.78
          - name: Byte Perplexity
            type: byte_perplexity
            value: 1.8981
          - name: Bits Per Byte
            type: bits_per_byte
            value: 0.9245
        source:
          name: lm-eval
          url: https://github.com/EleutherAI/lm-evaluation-harness
datasets:
  - HuggingFaceTB/dclm-edu
  - HuggingFaceFW/fineweb-edu

Zedev-V2

Base Loop Transformer causal language model with 82.14M parameters trained on 45.09B tokens (DCLM + FineWeb-Edu).

Architecture

Field Value
Parameters 82.14M
Structure Loop Transformer (2 prelude + 6 core x 3 loops + 2 coda = 10 physical / 22 effective layers)
Loop Gates Per-token sigmoid residual gates (gw, gb) on core passes 2 & 3
Hidden size 896
Attention 4:1 MQA (4 Query / 1 KV head, head_dim 128)
Intermediate size 1536 SwiGLU
Norm RMSNorm (eps 1e-5) + per-head QK-Norm
RoPE theta 20000.0
Context length 2048
Vocab size 32768 (`0: <
Embeddings Tied (lm_head == embed_tokens)
Tokens seen 45.09B

Benchmarks (lm-evaluation-harness, 0-shot)

Benchmark Metric Zedev-V2 (82M)
ARC-Challenge acc_norm 24.83%
acc 23.29%
ARC-Easy acc 52.69%
acc_norm 46.34%
BoolQ acc 59.69%
OpenBookQA acc_norm 30.40%
acc 19.40%
SciQ acc 76.80%
acc_norm 66.90%
WikiText-2 word_perplexity (down) 30.78
byte_perplexity (down) 1.8981
bits_per_byte (down) 0.9245

Usage

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("Meridian-MRM/Zedev-V2")
model = AutoModelForCausalLM.from_pretrained(
    "Meridian-MRM/Zedev-V2", trust_remote_code=True, torch_dtype=torch.float16
).cuda().eval()

prompt = "The old lighthouse keeper walked to the edge of the cliff and"
ids = tok(prompt, return_tensors="pt").input_ids.to(model.device)
with torch.no_grad():
    out = model.generate(ids, max_new_tokens=128, do_sample=True, temperature=0.7, top_p=0.95, repetition_penalty=1.15)
print(tok.decode(out[0], skip_special_tokens=True))

License

Apache 2.0