Text Generation
Transformers
Safetensors
PyTorch
English
lamoe
mixture-of-experts
custom-code
conversational
Instructions to use IMvision12/lamoe-247 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IMvision12/lamoe-247 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IMvision12/lamoe-247") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IMvision12/lamoe-247", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IMvision12/lamoe-247 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IMvision12/lamoe-247" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IMvision12/lamoe-247", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/IMvision12/lamoe-247
- SGLang
How to use IMvision12/lamoe-247 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 "IMvision12/lamoe-247" \ --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": "IMvision12/lamoe-247", "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 "IMvision12/lamoe-247" \ --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": "IMvision12/lamoe-247", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use IMvision12/lamoe-247 with Docker Model Runner:
docker model run hf.co/IMvision12/lamoe-247
Download config.json from IMvision12/lamoe-247: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/IMvision12/lamoe-247/resolve/main/config.json
- Command line
-
hf download hf://IMvision12/lamoe-247/config.json
-
curl -L -o config.json https://huggingface.co/IMvision12/lamoe-247/resolve/main/config.json
1.15 kB
| { | |
| "architectures": [ | |
| "LaMoEForCausalLM" | |
| ], | |
| "bos_token_id": 2, | |
| "dense_ffn_width": 2048, | |
| "eos_token_id": [ | |
| 3, | |
| 10 | |
| ], | |
| "expert_ffn_width": 1024, | |
| "experts_per_token": 2, | |
| "fusion_gate_init": 0.1, | |
| "gdn_backend": "reference", | |
| "gdn_conv_width": 4, | |
| "gdn_heads": 4, | |
| "gdn_key_dim": 64, | |
| "gdn_value_dim": 64, | |
| "head_gate_bias_init": null, | |
| "hidden_size": 768, | |
| "hybrid_layers": [ | |
| 4, | |
| 8, | |
| 12, | |
| 16 | |
| ], | |
| "initializer_std": 0.02, | |
| "is_decoder": true, | |
| "kv_rank": 192, | |
| "load_balance_coef": 0.01, | |
| "max_position_embeddings": 2048, | |
| "mla_backend": "sdpa", | |
| "mla_head_gate": false, | |
| "mla_heads": 12, | |
| "model_type": "lamoe", | |
| "moe_backend": "batched", | |
| "num_experts": 8, | |
| "num_layers": 16, | |
| "pad_token_id": 0, | |
| "q_rank": 192, | |
| "qk_content_dim": 48, | |
| "qk_rope_dim": 16, | |
| "rms_norm_eps": 1e-06, | |
| "rope_theta": 10000.0, | |
| "router_initializer_std": 0.01, | |
| "router_z_coef": 0.001, | |
| "shared_ffn_width": 512, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.17.0", | |
| "use_cache": true, | |
| "value_head_dim": 64, | |
| "vocab_size": 32000 | |
| } | |