Text Generation
Transformers
Safetensors
English
zedev_v2
zedev
loop-transformer
causal-lm
base-model
small-language-model
custom_code
Eval Results (legacy)
Instructions to use Meridian-MRM/Zedev-V2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Meridian-MRM/Zedev-V2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Meridian-MRM/Zedev-V2", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Meridian-MRM/Zedev-V2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Meridian-MRM/Zedev-V2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Meridian-MRM/Zedev-V2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Meridian-MRM/Zedev-V2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Meridian-MRM/Zedev-V2
- SGLang
How to use Meridian-MRM/Zedev-V2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Meridian-MRM/Zedev-V2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Meridian-MRM/Zedev-V2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Meridian-MRM/Zedev-V2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Meridian-MRM/Zedev-V2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Meridian-MRM/Zedev-V2 with Docker Model Runner:
docker model run hf.co/Meridian-MRM/Zedev-V2
|
Download README.md from Meridian-MRM/Zedev-V2: direct link, hf CLI and curl.
- Browser
- Download file 4.47 kB
-
https://huggingface.co/Meridian-MRM/Zedev-V2/resolve/main/README.md
- Command line
-
hf download hf://Meridian-MRM/Zedev-V2/README.md
-
curl -L -o README.md https://huggingface.co/Meridian-MRM/Zedev-V2/resolve/main/README.md
4.47 kB
| 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: <|begin_of_text|>`, `1: <|end_of_text|>`, `2: <|pad|>`) | | |
| | 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 | |
| ```python | |
| 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 | |