Text Generation
Transformers
Safetensors
glm_moe_dsa
qfs
fixture
random-init
cpu
reproducibility
random-architecture-fixture
testing
random-initialization
bfloat16
Instructions to use malaiwah/glm-moe-dsa-tiny-random-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use malaiwah/glm-moe-dsa-tiny-random-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="malaiwah/glm-moe-dsa-tiny-random-bf16")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("malaiwah/glm-moe-dsa-tiny-random-bf16") model = AutoModelForCausalLM.from_pretrained("malaiwah/glm-moe-dsa-tiny-random-bf16", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use malaiwah/glm-moe-dsa-tiny-random-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "malaiwah/glm-moe-dsa-tiny-random-bf16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/malaiwah/glm-moe-dsa-tiny-random-bf16
- SGLang
How to use malaiwah/glm-moe-dsa-tiny-random-bf16 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 "malaiwah/glm-moe-dsa-tiny-random-bf16" \ --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": "malaiwah/glm-moe-dsa-tiny-random-bf16", "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 "malaiwah/glm-moe-dsa-tiny-random-bf16" \ --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": "malaiwah/glm-moe-dsa-tiny-random-bf16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use malaiwah/glm-moe-dsa-tiny-random-bf16 with Docker Model Runner:
docker model run hf.co/malaiwah/glm-moe-dsa-tiny-random-bf16
Download config.json from malaiwah/glm-moe-dsa-tiny-random-bf16: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/malaiwah/glm-moe-dsa-tiny-random-bf16/resolve/main/config.json
- Command line
-
hf download hf://malaiwah/glm-moe-dsa-tiny-random-bf16/config.json
-
curl -L -o config.json https://huggingface.co/malaiwah/glm-moe-dsa-tiny-random-bf16/resolve/main/config.json
1.48 kB
| { | |
| "architectures": [ | |
| "GlmMoeDsaForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 1, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 2, | |
| "first_k_dense_replace": 1, | |
| "head_dim": 8, | |
| "hidden_act": "silu", | |
| "hidden_size": 64, | |
| "index_head_dim": 16, | |
| "index_n_heads": 4, | |
| "index_topk": 8, | |
| "indexer_types": [ | |
| "full", | |
| "shared", | |
| "full", | |
| "shared" | |
| ], | |
| "initializer_range": 0.02, | |
| "intermediate_size": 128, | |
| "kv_lora_rank": 16, | |
| "layer_types": [ | |
| "deepseek_sparse_attention", | |
| "deepseek_sparse_attention", | |
| "deepseek_sparse_attention", | |
| "deepseek_sparse_attention" | |
| ], | |
| "max_position_embeddings": 256, | |
| "mlp_bias": false, | |
| "mlp_layer_types": [ | |
| "dense", | |
| "sparse", | |
| "sparse", | |
| "sparse" | |
| ], | |
| "model_type": "glm_moe_dsa", | |
| "moe_intermediate_size": 32, | |
| "n_group": 1, | |
| "n_routed_experts": 8, | |
| "n_shared_experts": 1, | |
| "norm_topk_prob": true, | |
| "num_attention_heads": 4, | |
| "num_experts_per_tok": 2, | |
| "num_hidden_layers": 4, | |
| "num_key_value_heads": 4, | |
| "num_nextn_predict_layers": 0, | |
| "pad_token_id": 0, | |
| "q_lora_rank": 32, | |
| "qk_head_dim": 16, | |
| "qk_nope_head_dim": 8, | |
| "qk_rope_head_dim": 8, | |
| "rms_norm_eps": 1e-05, | |
| "rope_parameters": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "default" | |
| }, | |
| "routed_scaling_factor": 2.5, | |
| "tie_word_embeddings": false, | |
| "topk_group": 1, | |
| "transformers_version": "5.16.1", | |
| "use_cache": true, | |
| "v_head_dim": 16, | |
| "vocab_size": 260 | |
| } | |