Instructions to use maple-matrix/quasar-sn24-e2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use maple-matrix/quasar-sn24-e2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="maple-matrix/quasar-sn24-e2", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("maple-matrix/quasar-sn24-e2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use maple-matrix/quasar-sn24-e2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "maple-matrix/quasar-sn24-e2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "maple-matrix/quasar-sn24-e2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/maple-matrix/quasar-sn24-e2
- SGLang
How to use maple-matrix/quasar-sn24-e2 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 "maple-matrix/quasar-sn24-e2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "maple-matrix/quasar-sn24-e2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "maple-matrix/quasar-sn24-e2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "maple-matrix/quasar-sn24-e2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use maple-matrix/quasar-sn24-e2 with Docker Model Runner:
docker model run hf.co/maple-matrix/quasar-sn24-e2
| { | |
| "model_type": "quasar", | |
| "vocab_size": 248320, | |
| "d_model": 1536, | |
| "n_heads": 12, | |
| "n_layers": 24, | |
| "d_ff": 4096, | |
| "head_dim": 128, | |
| "max_seq_len": 16384, | |
| "dropout": 0.0, | |
| "rms_norm_eps": 1e-06, | |
| "initializer_range": 0.02, | |
| "use_cache": true, | |
| "tie_word_embeddings": false, | |
| "quasar_layers": 4, | |
| "gated_layers": 2, | |
| "use_gla_first": false, | |
| "use_short_conv": true, | |
| "conv_size": 4, | |
| "conv_bias": false, | |
| "allow_neg_eigval": false, | |
| "attn_mode": "chunk", | |
| "expand_k": 0.5, | |
| "expand_v": 1.0, | |
| "gla_mode": "chunk", | |
| "memory_slots": 128, | |
| "memory_dim": 128, | |
| "moe_type": "bigmac", | |
| "num_shared_experts": 1, | |
| "num_routed_experts": 64, | |
| "top_k": 4, | |
| "shared_expert_size": 3072, | |
| "routed_expert_size": 256, | |
| "dense_input_layers": 4, | |
| "bigmac_r": 0.25, | |
| "moe_z_loss_coeff": 0.0001, | |
| "moe_aux_loss_coeff": 0.0001, | |
| "smebu_kappa": 2.0, | |
| "smebu_lambda": 0.002, | |
| "smebu_beta": 0.5, | |
| "num_loops": 1, | |
| "use_looped_injection": false, | |
| "looped_injection_init": 0.1, | |
| "rope_theta": 1000000.0, | |
| "hidden_act": "silu", | |
| "residual_scale": 0.1, | |
| "bos_token_id": 1, | |
| "eos_token_id": 2, | |
| "auto_map": { | |
| "AutoConfig": "configuration_quasar.QuasarConfig", | |
| "AutoModelForCausalLM": "modeling_quasar.QuasarForCausalLM" | |
| }, | |
| "architectures": [ | |
| "QuasarForCausalLM" | |
| ] | |
| } | |