Text Generation
Transformers
Safetensors
astrai_pluto
mixture-of-experts
Mixture of Experts
astrai
pluto-nano
base
causal-lm
custom_code
Instructions to use ASTRAI-labs/pluto-nano-0.5-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ASTRAI-labs/pluto-nano-0.5-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ASTRAI-labs/pluto-nano-0.5-base", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ASTRAI-labs/pluto-nano-0.5-base", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ASTRAI-labs/pluto-nano-0.5-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ASTRAI-labs/pluto-nano-0.5-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ASTRAI-labs/pluto-nano-0.5-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ASTRAI-labs/pluto-nano-0.5-base
- SGLang
How to use ASTRAI-labs/pluto-nano-0.5-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 "ASTRAI-labs/pluto-nano-0.5-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": "ASTRAI-labs/pluto-nano-0.5-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 "ASTRAI-labs/pluto-nano-0.5-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": "ASTRAI-labs/pluto-nano-0.5-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ASTRAI-labs/pluto-nano-0.5-base with Docker Model Runner:
docker model run hf.co/ASTRAI-labs/pluto-nano-0.5-base
| { | |
| "vocab_size": 32768, | |
| "hidden_size": 384, | |
| "intermediate_size_expert": 1536, | |
| "intermediate_size_shared": 0, | |
| "n_layers": 16, | |
| "n_heads": 6, | |
| "n_kv_heads": 2, | |
| "n_experts": 35, | |
| "top_k": 1, | |
| "n_languages": 5, | |
| "max_position_embeddings": 4096, | |
| "rope_theta": 1000000.0, | |
| "rms_norm_eps": 1e-06, | |
| "tie_word_embeddings": true, | |
| "mtp_depth": 2, | |
| "mtp_loss_weight": 0, | |
| "router_aux_loss_coef": 0.01, | |
| "router_z_loss_coef": 0.001, | |
| "model_type": "astrai_pluto", | |
| "pad_token_id": 0, | |
| "bos_token_id": 1, | |
| "eos_token_id": 2, | |
| "tokenizer_name": "pluto_nano_32k_bpe" | |
| } |