Text Generation
Transformers
Safetensors
English
gated_deltanet
gated-deltanet
linear-attention
recurrent
long-context
research
Instructions to use LLM-OS-Models/gdn1-16k32k-bridge-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LLM-OS-Models/gdn1-16k32k-bridge-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LLM-OS-Models/gdn1-16k32k-bridge-1b")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("LLM-OS-Models/gdn1-16k32k-bridge-1b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LLM-OS-Models/gdn1-16k32k-bridge-1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LLM-OS-Models/gdn1-16k32k-bridge-1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLM-OS-Models/gdn1-16k32k-bridge-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LLM-OS-Models/gdn1-16k32k-bridge-1b
- SGLang
How to use LLM-OS-Models/gdn1-16k32k-bridge-1b 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 "LLM-OS-Models/gdn1-16k32k-bridge-1b" \ --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": "LLM-OS-Models/gdn1-16k32k-bridge-1b", "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 "LLM-OS-Models/gdn1-16k32k-bridge-1b" \ --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": "LLM-OS-Models/gdn1-16k32k-bridge-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LLM-OS-Models/gdn1-16k32k-bridge-1b with Docker Model Runner:
docker model run hf.co/LLM-OS-Models/gdn1-16k32k-bridge-1b
Upload GDN1 16K/32K Bridge 1B Full Fine-Tune
Browse files- README.md +61 -0
- config.json +38 -0
- generation_config.json +9 -0
- model.safetensors +3 -0
- train_plan.json +27 -0
README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: linear-moe-hub/Gated-Deltanet-1.3B
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
library_name: transformers
|
| 7 |
+
tags:
|
| 8 |
+
- gated-deltanet
|
| 9 |
+
- linear-attention
|
| 10 |
+
- recurrent
|
| 11 |
+
- long-context
|
| 12 |
+
- research
|
| 13 |
+
datasets:
|
| 14 |
+
- HuggingFaceFW/fineweb-edu
|
| 15 |
+
- cerebras/SlimPajama-627B
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# GDN1 16K/32K Bridge 1B Full Fine-Tune
|
| 19 |
+
|
| 20 |
+
This is a research checkpoint from the Long-GDN workspace.
|
| 21 |
+
|
| 22 |
+
## Base Model
|
| 23 |
+
|
| 24 |
+
- Base checkpoint: `linear-moe-hub/Gated-Deltanet-1.3B`
|
| 25 |
+
- Architecture: Gated DeltaNet / linear recurrent attention
|
| 26 |
+
- Base training data reported by the upstream model card: SlimPajama 100B-token sample
|
| 27 |
+
- License inherited from upstream model card: Apache-2.0
|
| 28 |
+
|
| 29 |
+
## Training Run
|
| 30 |
+
|
| 31 |
+
- Local source path: `runs/gdn1_16k32k_bridge_from_balanced200_1b_bs10_ft/final`
|
| 32 |
+
- Tokenizer source: `runs/gdn1_16k32k_bridge_from_balanced200_1b_bs10_ft/final`
|
| 33 |
+
- Training mode: full fine-tuning, no LoRA/adapter
|
| 34 |
+
- Hardware target: 8x NVIDIA H200
|
| 35 |
+
- Sequence length: 32768
|
| 36 |
+
- Approximate additional token budget: ~1B additional tokens
|
| 37 |
+
- Manifest/config: `configs/gdn1_memory_mix_16k32k_bridge_recovery.json`
|
| 38 |
+
|
| 39 |
+
## Intended Research Use
|
| 40 |
+
|
| 41 |
+
This checkpoint is intended for research on:
|
| 42 |
+
|
| 43 |
+
- long-context associative recall
|
| 44 |
+
- RULER/MQAR-style state tracking
|
| 45 |
+
- recurrent-state contamination during long generation
|
| 46 |
+
- Reference-State Reset with Rolling Replay, a GDN/RNN adaptation of the R-SWA idea
|
| 47 |
+
|
| 48 |
+
## Known Results
|
| 49 |
+
|
| 50 |
+
Bridge continuation from balanced checkpoint-200. It improved some mid-length MQAR bands in checkpoint sweeps but reintroduced 32K instability; not selected as the best branch point.
|
| 51 |
+
|
| 52 |
+
## Caveats
|
| 53 |
+
|
| 54 |
+
Not the current best checkpoint. Use as an ablation checkpoint for 16K/32K bridge curriculum analysis.
|
| 55 |
+
|
| 56 |
+
## Citation Context
|
| 57 |
+
|
| 58 |
+
Relevant background papers include Gated Delta Networks, Gated DeltaNet-2,
|
| 59 |
+
Log-Linear Attention, and Unlimited OCR / R-SWA. This checkpoint does not
|
| 60 |
+
implement a new architecture by itself; it is part of a checkpoint-preserving
|
| 61 |
+
full fine-tuning and inference-control study.
|
config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"allow_neg_eigval": false,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"GatedDeltaNetForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attn": null,
|
| 7 |
+
"attn_mode": "chunk",
|
| 8 |
+
"bos_token_id": 1,
|
| 9 |
+
"conv_size": 4,
|
| 10 |
+
"dtype": "bfloat16",
|
| 11 |
+
"eos_token_id": 2,
|
| 12 |
+
"expand_v": 1,
|
| 13 |
+
"fuse_cross_entropy": true,
|
| 14 |
+
"fuse_linear_cross_entropy": false,
|
| 15 |
+
"fuse_norm": true,
|
| 16 |
+
"fuse_swiglu": true,
|
| 17 |
+
"head_dim": 256,
|
| 18 |
+
"hidden_act": "swish",
|
| 19 |
+
"hidden_ratio": 4,
|
| 20 |
+
"hidden_size": 2048,
|
| 21 |
+
"initializer_range": 0.02,
|
| 22 |
+
"intermediate_size": null,
|
| 23 |
+
"max_position_embeddings": 2048,
|
| 24 |
+
"model_type": "gated_deltanet",
|
| 25 |
+
"norm_eps": 1e-06,
|
| 26 |
+
"norm_first": false,
|
| 27 |
+
"num_heads": 4,
|
| 28 |
+
"num_hidden_layers": 24,
|
| 29 |
+
"num_v_heads": null,
|
| 30 |
+
"pad_token_id": null,
|
| 31 |
+
"tie_word_embeddings": true,
|
| 32 |
+
"transformers_version": "5.5.4",
|
| 33 |
+
"use_cache": false,
|
| 34 |
+
"use_gate": true,
|
| 35 |
+
"use_l2warp": false,
|
| 36 |
+
"use_short_conv": false,
|
| 37 |
+
"vocab_size": 32000
|
| 38 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"output_attentions": false,
|
| 6 |
+
"output_hidden_states": false,
|
| 7 |
+
"transformers_version": "5.5.4",
|
| 8 |
+
"use_cache": false
|
| 9 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f948011d5b3f338003c62fe9550bc3fb26c53bb8dc9a2c299197a4300b1f3f86
|
| 3 |
+
size 2296371864
|
train_plan.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"mode": "full_finetune",
|
| 3 |
+
"target_hardware": "8x NVIDIA H200",
|
| 4 |
+
"model_path": "/home/work/.projects/LLM-OS-Models/long-gdn/runs/gdn1_32k_balanced_recovery_1b_bs10_ft/checkpoint-200",
|
| 5 |
+
"tokenizer_path": "/home/work/.projects/LLM-OS-Models/long-gdn/runs/gdn1_32k_balanced_recovery_1b_bs10_ft/final",
|
| 6 |
+
"manifest": "/home/work/.projects/LLM-OS-Models/long-gdn/configs/gdn1_memory_mix_16k32k_bridge_recovery.json",
|
| 7 |
+
"output_dir": "/home/work/.projects/LLM-OS-Models/long-gdn/runs/gdn1_16k32k_bridge_from_balanced200_1b_bs10_ft",
|
| 8 |
+
"seq_len": 32768,
|
| 9 |
+
"per_device_batch_size": 10,
|
| 10 |
+
"grad_accum": 1,
|
| 11 |
+
"world_size_assumed": 8,
|
| 12 |
+
"global_tokens_per_step": 2621440,
|
| 13 |
+
"max_steps": 382,
|
| 14 |
+
"target_tokens": 1001390080,
|
| 15 |
+
"learning_rate": 5e-06,
|
| 16 |
+
"warmup_steps": 25,
|
| 17 |
+
"weight_decay": 0.1,
|
| 18 |
+
"optim": "adamw_torch_fused",
|
| 19 |
+
"bf16": true,
|
| 20 |
+
"gradient_checkpointing": true,
|
| 21 |
+
"override_max_position_embeddings": null,
|
| 22 |
+
"notes": [
|
| 23 |
+
"No LoRA/PEFT adapters are used.",
|
| 24 |
+
"All model parameters remain trainable unless the model implementation freezes them.",
|
| 25 |
+
"Dry-run writes this plan without loading model weights."
|
| 26 |
+
]
|
| 27 |
+
}
|