Text Generation
Transformers
Safetensors
English
Chinese
glm4_moe_lite
quantized
Mixture of Experts
4-bit precision
GPTQ
MMFP4
glm
metal-marlin
Mixture of Experts
Instructions to use RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4") model = AutoModelForCausalLM.from_pretrained("RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4
- SGLang
How to use RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4 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 "RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4" \ --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": "RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4", "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 "RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4" \ --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": "RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4 with Docker Model Runner:
docker model run hf.co/RESMP-DEV/GLM-4.7-Flash-Marlin-MMFP4
File size: 1,070 Bytes
ed522a2 | 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 44 45 46 | {
"architectures": [
"Glm4MoeLiteForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"pad_token_id": 154820,
"eos_token_id": [
154820,
154827,
154829
],
"hidden_act": "silu",
"hidden_size": 2048,
"intermediate_size": 10240,
"max_position_embeddings": 202752,
"model_type": "glm4_moe_lite",
"moe_intermediate_size": 1536,
"topk_method": "noaux_tc",
"norm_topk_prob": true,
"num_attention_heads": 20,
"n_group": 1,
"topk_group": 1,
"n_routed_experts": 64,
"n_shared_experts": 1,
"routed_scaling_factor": 1.8,
"num_experts_per_tok": 4,
"first_k_dense_replace": 1,
"num_hidden_layers": 47,
"num_key_value_heads": 20,
"num_nextn_predict_layers": 1,
"partial_rotary_factor": 1.0,
"rms_norm_eps": 1e-05,
"rope_scaling": null,
"rope_theta": 1000000,
"tie_word_embeddings": false,
"dtype": "bfloat16",
"transformers_version": "5.0.0rc0",
"q_lora_rank": 768,
"kv_lora_rank": 512,
"qk_nope_head_dim": 192,
"qk_rope_head_dim": 64,
"v_head_dim": 256,
"vocab_size": 154880
}
|