Text Generation
Transformers
outlier_150b_rexmoe
mixture-of-experts
Mixture of Experts
ternary
quantized
qwen2.5
outlier
local-llm
on-device
edge-ai
energy-efficient
sparse
overlay
research
apple-silicon
mac
mmlu-verified
custom_code
Eval Results (legacy)
Instructions to use Outlier-Ai/Outlier-150B-V3.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Outlier-Ai/Outlier-150B-V3.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Outlier-Ai/Outlier-150B-V3.2", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Outlier-Ai/Outlier-150B-V3.2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Outlier-Ai/Outlier-150B-V3.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Outlier-Ai/Outlier-150B-V3.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Outlier-Ai/Outlier-150B-V3.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Outlier-Ai/Outlier-150B-V3.2
- SGLang
How to use Outlier-Ai/Outlier-150B-V3.2 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 "Outlier-Ai/Outlier-150B-V3.2" \ --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": "Outlier-Ai/Outlier-150B-V3.2", "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 "Outlier-Ai/Outlier-150B-V3.2" \ --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": "Outlier-Ai/Outlier-150B-V3.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Outlier-Ai/Outlier-150B-V3.2 with Docker Model Runner:
docker model run hf.co/Outlier-Ai/Outlier-150B-V3.2
Upload configuration_outlier_150b_rexmoe.py with huggingface_hub
Browse files
configuration_outlier_150b_rexmoe.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import PretrainedConfig
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
class OutlierReXMoEConfig(PretrainedConfig):
|
| 5 |
+
model_type = "outlier_150b_rexmoe"
|
| 6 |
+
|
| 7 |
+
def __init__(
|
| 8 |
+
self,
|
| 9 |
+
base_model_name_or_path=None,
|
| 10 |
+
moe_layers=None,
|
| 11 |
+
n_experts=8,
|
| 12 |
+
top_k=2,
|
| 13 |
+
psr_scales=None,
|
| 14 |
+
group_size=4,
|
| 15 |
+
**kwargs,
|
| 16 |
+
):
|
| 17 |
+
super().__init__(**kwargs)
|
| 18 |
+
self.base_model_name_or_path = base_model_name_or_path
|
| 19 |
+
self.moe_layers = list(moe_layers or [])
|
| 20 |
+
self.n_experts = int(n_experts)
|
| 21 |
+
self.top_k = int(top_k)
|
| 22 |
+
self.psr_scales = list(psr_scales or [0.7, 0.9, 1.1, 1.3])
|
| 23 |
+
self.group_size = int(group_size)
|