Instructions to use Cheeeeeeeeky/affine with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Cheeeeeeeeky/affine with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Cheeeeeeeeky/affine")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Cheeeeeeeeky/affine", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Cheeeeeeeeky/affine with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Cheeeeeeeeky/affine" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Cheeeeeeeeky/affine", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Cheeeeeeeeky/affine
- SGLang
How to use Cheeeeeeeeky/affine 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 "Cheeeeeeeeky/affine" \ --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": "Cheeeeeeeeky/affine", "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 "Cheeeeeeeeky/affine" \ --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": "Cheeeeeeeeky/affine", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Cheeeeeeeeky/affine with Docker Model Runner:
docker model run hf.co/Cheeeeeeeeky/affine
upload model
Browse files
inference/config_671B_v3.2.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"vocab_size": 129280,
|
| 3 |
+
"dim": 7168,
|
| 4 |
+
"inter_dim": 18432,
|
| 5 |
+
"moe_inter_dim": 2048,
|
| 6 |
+
"n_layers": 61,
|
| 7 |
+
"n_dense_layers": 3,
|
| 8 |
+
"n_heads": 128,
|
| 9 |
+
"n_routed_experts": 256,
|
| 10 |
+
"n_shared_experts": 1,
|
| 11 |
+
"n_activated_experts": 8,
|
| 12 |
+
"n_expert_groups": 8,
|
| 13 |
+
"n_limited_groups": 4,
|
| 14 |
+
"route_scale": 2.5,
|
| 15 |
+
"score_func": "sigmoid",
|
| 16 |
+
"q_lora_rank": 1536,
|
| 17 |
+
"kv_lora_rank": 512,
|
| 18 |
+
"qk_nope_head_dim": 128,
|
| 19 |
+
"qk_rope_head_dim": 64,
|
| 20 |
+
"v_head_dim": 128,
|
| 21 |
+
"dtype": "fp8",
|
| 22 |
+
"scale_fmt": "ue8m0",
|
| 23 |
+
"index_n_heads": 64,
|
| 24 |
+
"index_head_dim": 128,
|
| 25 |
+
"index_topk": 2048
|
| 26 |
+
}
|