Text Generation
Transformers
Safetensors
glm4_moe_lite
fp8
quantized
glm4
Mixture of Experts
conversational
Instructions to use marksverdhei/GLM-4.7-Flash-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marksverdhei/GLM-4.7-Flash-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="marksverdhei/GLM-4.7-Flash-FP8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("marksverdhei/GLM-4.7-Flash-FP8") model = AutoModelForCausalLM.from_pretrained("marksverdhei/GLM-4.7-Flash-FP8", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use marksverdhei/GLM-4.7-Flash-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "marksverdhei/GLM-4.7-Flash-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marksverdhei/GLM-4.7-Flash-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/marksverdhei/GLM-4.7-Flash-FP8
- SGLang
How to use marksverdhei/GLM-4.7-Flash-FP8 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 "marksverdhei/GLM-4.7-Flash-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marksverdhei/GLM-4.7-Flash-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "marksverdhei/GLM-4.7-Flash-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marksverdhei/GLM-4.7-Flash-FP8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use marksverdhei/GLM-4.7-Flash-FP8 with Docker Model Runner:
docker model run hf.co/marksverdhei/GLM-4.7-Flash-FP8
Commit History
-
Update README.md
Verified signature1f6f51d
-
Update README.md
Verified signature7235635
-
Update README.md
Verified signature8921e2e
-
Add vLLM fork link for MLA detection support
Verified signature5d2df64 -
Add performance benchmarks (19.4 tok/s on 2x RTX 3090)
Verified signature60a4777 -
Delete generation_config.json with huggingface_hub
Verified signatureacede35 -
Delete model.safetensors.index.json with huggingface_hub
Verified signature290f280 -
Delete model-00011-of-00011.safetensors with huggingface_hub
Verified signature4eed33c -
Delete model-00010-of-00011.safetensors with huggingface_hub
Verified signature10f5c7b -
Delete model-00009-of-00011.safetensors with huggingface_hub
Verified signature45ffd58 -
Delete model-00008-of-00011.safetensors with huggingface_hub
Verified signature95e86ad -
Delete model-00007-of-00011.safetensors with huggingface_hub
Verified signaturedd551a0 -
Delete model-00006-of-00011.safetensors with huggingface_hub
Verified signaturebe8a731 -
Delete model-00005-of-00011.safetensors with huggingface_hub
Verified signature6e71fda -
Delete model-00004-of-00011.safetensors with huggingface_hub
Verified signature5bd9717 -
Delete model-00003-of-00011.safetensors with huggingface_hub
Verified signature7563c1b -
Delete model-00002-of-00011.safetensors with huggingface_hub
Verified signaturef4211ab -
Delete model-00001-of-00011.safetensors with huggingface_hub
Verified signature0c350d0 -
Upload folder using huggingface_hub
Verified signature180a767 -
Add quantization_config for FP8
Verified signature71ad4b3 -
Fix license to MIT
Verified signature02419e3 -
Update README.md
Verified signature82cc0ee -
Update README.md
Verified signatureadc406d -
Upload FP8 quantized GLM-4.7-Flash
Verified signature760b1d9 -
initial commit
Verified signature915cc81