Text Generation
Transformers
TensorBoard
Safetensors
English
zarya_lm
pretrained
from-scratch
tiny-llm-ablation
custom_code
causal-lm
Eval Results (legacy)
Instructions to use d0rj/zarya-51M-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use d0rj/zarya-51M-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="d0rj/zarya-51M-base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("d0rj/zarya-51M-base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use d0rj/zarya-51M-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "d0rj/zarya-51M-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "d0rj/zarya-51M-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/d0rj/zarya-51M-base
- SGLang
How to use d0rj/zarya-51M-base 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 "d0rj/zarya-51M-base" \ --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": "d0rj/zarya-51M-base", "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 "d0rj/zarya-51M-base" \ --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": "d0rj/zarya-51M-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use d0rj/zarya-51M-base with Docker Model Runner:
docker model run hf.co/d0rj/zarya-51M-base
Download config.json from d0rj/zarya-51M-base: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/d0rj/zarya-51M-base/resolve/main/config.json
- Command line
-
hf download hf://d0rj/zarya-51M-base/config.json
-
curl -L -o config.json https://huggingface.co/d0rj/zarya-51M-base/resolve/main/config.json
1.36 kB
| { | |
| "architectures": [ | |
| "ZaryaLMForCausalLM" | |
| ], | |
| "attention_dropout": 0.0, | |
| "attention_scalar_gate": false, | |
| "bos_token_id": 1, | |
| "diffusion_loss_proportion": 0.5, | |
| "dtype": "float32", | |
| "eos_token_id": 2, | |
| "gate_multiplier": 2.0, | |
| "head_dim": 128, | |
| "hidden_size": 512, | |
| "intermediate_size": 1440, | |
| "mask_token_id": 32768, | |
| "max_position_embeddings": 2048, | |
| "mlp_scalar_gate": false, | |
| "model_type": "zarya_lm", | |
| "noise_eps": 0.001, | |
| "nope_every_n": null, | |
| "nope_layers": [], | |
| "num_attention_heads": 8, | |
| "num_hidden_layers": 9, | |
| "num_key_value_heads": 4, | |
| "pad_token_id": 0, | |
| "qk_norm": true, | |
| "rms_norm_eps": 1e-06, | |
| "rope_theta": 1000000.0, | |
| "slot_borders": [ | |
| 0.06, | |
| 0.2, | |
| 0.4, | |
| 0.6, | |
| 0.8, | |
| 1.0 | |
| ], | |
| "slot_sizes": [ | |
| 2, | |
| 4, | |
| 8, | |
| 16, | |
| 32, | |
| 64 | |
| ], | |
| "tie_word_embeddings": true, | |
| "training_objective": "zarya-slotted-pretrain-v1", | |
| "transformers_version": "5.17.0", | |
| "vocab_size": 32769, | |
| "zarya_tokenizer": { | |
| "base_tokenizer_sha256": "fc71a154536f6c84a5bf729d06324032126603ef5183c0b4979407e4fad68a8d", | |
| "base_vocab_size": 32768, | |
| "mask_token": "<|mdm_mask|>", | |
| "mask_token_id": 32768 | |
| }, | |
| "auto_map": { | |
| "AutoConfig": "configuration_zarya_lm.ZaryaLMConfig", | |
| "AutoModelForCausalLM": "modeling_zarya_lm.ZaryaLMForCausalLM" | |
| }, | |
| "_name_or_path": "d0rj/zarya-51M-base" | |
| } | |