Text Generation
Transformers
Safetensors
English
llama
nanodex
tiny-lm
pretrained-from-scratch
text-generation-inference
Instructions to use SLM-Archive/NanoDex-Test-500K-200M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SLM-Archive/NanoDex-Test-500K-200M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SLM-Archive/NanoDex-Test-500K-200M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SLM-Archive/NanoDex-Test-500K-200M") model = AutoModelForCausalLM.from_pretrained("SLM-Archive/NanoDex-Test-500K-200M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SLM-Archive/NanoDex-Test-500K-200M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SLM-Archive/NanoDex-Test-500K-200M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SLM-Archive/NanoDex-Test-500K-200M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SLM-Archive/NanoDex-Test-500K-200M
- SGLang
How to use SLM-Archive/NanoDex-Test-500K-200M 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 "SLM-Archive/NanoDex-Test-500K-200M" \ --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": "SLM-Archive/NanoDex-Test-500K-200M", "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 "SLM-Archive/NanoDex-Test-500K-200M" \ --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": "SLM-Archive/NanoDex-Test-500K-200M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SLM-Archive/NanoDex-Test-500K-200M with Docker Model Runner:
docker model run hf.co/SLM-Archive/NanoDex-Test-500K-200M
Download training_run.json from SLM-Archive/NanoDex-Test-500K-200M: direct link, hf CLI and curl.
- Browser
- Download file 606 Bytes
-
https://huggingface.co/SLM-Archive/NanoDex-Test-500K-200M/resolve/main/training_run.json
- Command line
-
hf download hf://SLM-Archive/NanoDex-Test-500K-200M/training_run.json
-
curl -L -o training_run.json https://huggingface.co/SLM-Archive/NanoDex-Test-500K-200M/resolve/main/training_run.json
606 Bytes
| { | |
| "job_id": "0a98a7d8fd4f", | |
| "tier": "500k", | |
| "label": "NanoDex-500k", | |
| "n_params": 492192, | |
| "target_tokens": 200000000, | |
| "tokens_seen": 199884800, | |
| "steps": 1525, | |
| "seq_len": 512, | |
| "final_loss": 3.817596435546875, | |
| "best_loss": 3.6255829334259033, | |
| "peak_lr": 0.004, | |
| "batch_tokens": 131072, | |
| "optimizer": "AdamW(0.9, 0.95) wd=0.1 clip=1.0", | |
| "schedule": "warmup 2% + cosine to 10%", | |
| "dataset": "HuggingFaceFW/fineweb-edu (sample-10BT)", | |
| "architecture": "LlamaForCausalLM (SiLU, RMSNorm, RoPE, GQA, tied embeddings)", | |
| "wall_time_s": 309.3608708381653, | |
| "trained_by": "DedeProGames" | |
| } |