Text Generation
Transformers
Safetensors
Chinese
English
yebb_moe
mixture-of-experts
pretrained
base-model
research
custom_code
Instructions to use sinksilk/Yebb-MoE-2B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sinksilk/Yebb-MoE-2B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sinksilk/Yebb-MoE-2B-Base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("sinksilk/Yebb-MoE-2B-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sinksilk/Yebb-MoE-2B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sinksilk/Yebb-MoE-2B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sinksilk/Yebb-MoE-2B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sinksilk/Yebb-MoE-2B-Base
- SGLang
How to use sinksilk/Yebb-MoE-2B-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 "sinksilk/Yebb-MoE-2B-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": "sinksilk/Yebb-MoE-2B-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 "sinksilk/Yebb-MoE-2B-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": "sinksilk/Yebb-MoE-2B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sinksilk/Yebb-MoE-2B-Base with Docker Model Runner:
docker model run hf.co/sinksilk/Yebb-MoE-2B-Base
File size: 1,001 Bytes
8e63175 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | {
"status": "passed_CPU_FP32_export_verification",
"torch_version": "2.10.0+cpu",
"transformers_version": "5.20.2",
"parameters": 1962164864,
"all_state_tensors_exact": true,
"state_tensor_count": 176,
"all_state_tensors_finite": true,
"reference_logits": [
{
"text": "中国的首都是",
"tokens": 4,
"all_logits_bit_exact": true
},
{
"text": "The capital of France is",
"tokens": 6,
"all_logits_bit_exact": true
},
{
"text": "def is_even(n):\n return",
"tokens": 10,
"all_logits_bit_exact": true
}
],
"packed_document_mask_logits_bit_exact": true,
"left_padded_batch_matches_single_inputs": true,
"HF_generate_smoke_passed": true,
"generate_smoke_output_ids": [
1,
5297,
1851,
2431,
12935,
1439,
5297,
1851
],
"elapsed_seconds": 24.31835330836475,
"device": "cpu",
"scope": "Export/loading/numerical fidelity only, not a new capability evaluation."
}
|