Text Generation
Transformers
Safetensors
English
glm4_moe_lite
text-generation-inference
unsloth
conversational
Instructions to use shawon/GLM-4.7-Flash-16bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shawon/GLM-4.7-Flash-16bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shawon/GLM-4.7-Flash-16bit") 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("shawon/GLM-4.7-Flash-16bit") model = AutoModelForCausalLM.from_pretrained("shawon/GLM-4.7-Flash-16bit", 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 shawon/GLM-4.7-Flash-16bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shawon/GLM-4.7-Flash-16bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shawon/GLM-4.7-Flash-16bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/shawon/GLM-4.7-Flash-16bit
- SGLang
How to use shawon/GLM-4.7-Flash-16bit 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 "shawon/GLM-4.7-Flash-16bit" \ --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": "shawon/GLM-4.7-Flash-16bit", "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 "shawon/GLM-4.7-Flash-16bit" \ --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": "shawon/GLM-4.7-Flash-16bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use shawon/GLM-4.7-Flash-16bit with Docker Model Runner:
docker model run hf.co/shawon/GLM-4.7-Flash-16bit
Commit History
-
(Trained with Unsloth)
Verified signature9c60749 -
(Trained with Unsloth)
Verified signature997f962 -
(Trained with Unsloth)
Verified signaturec15810f -
(Trained with Unsloth)
Verified signature7e4506b -
(Trained with Unsloth)
Verified signature8781c3b -
(Trained with Unsloth)
Verified signature2d70834 -
(Trained with Unsloth)
Verified signature0b467ec -
(Trained with Unsloth)
Verified signaturec14a996 -
(Trained with Unsloth)
Verified signature24a101f -
(Trained with Unsloth)
Verified signature23dc5d5 -
(Trained with Unsloth)
Verified signature99eeb97 -
(Trained with Unsloth)
Verified signature0a34ed6 -
(Trained with Unsloth)
Verified signaturee801da4 -
(Trained with Unsloth)
Verified signature00c7c39 -
(Trained with Unsloth)
Verified signature60d0e5b -
(Trained with Unsloth)
Verified signature55a08b9 -
(Trained with Unsloth)
Verified signatureb2145b8 -
(Trained with Unsloth)
Verified signaturea826546 -
(Trained with Unsloth)
Verified signature64671ca -
(Trained with Unsloth)
Verified signaturec2f99f6 -
(Trained with Unsloth)
Verified signature0503dc4 -
(Trained with Unsloth)
Verified signaturebe2ed88 -
(Trained with Unsloth)
Verified signaturec6d9fac -
(Trained with Unsloth)
Verified signatureec3bec1 -
(Trained with Unsloth)
Verified signature770cc09 -
(Trained with Unsloth)
Verified signature5f3f6c9 -
(Trained with Unsloth)
Verified signature439e3e9 -
(Trained with Unsloth)
Verified signature9db5262 -
(Trained with Unsloth)
Verified signature70b7a70 -
(Trained with Unsloth)
Verified signature78e682e -
(Trained with Unsloth)
Verified signaturefd0f42d -
(Trained with Unsloth)
Verified signature225eb16 -
(Trained with Unsloth)
Verified signaturec1dcac2 -
(Trained with Unsloth)
Verified signature60a212f -
(Trained with Unsloth)
Verified signature502a70e -
(Trained with Unsloth)
Verified signaturea430ad0 -
(Trained with Unsloth)
Verified signature910431b -
(Trained with Unsloth)
Verified signaturea91c8de -
(Trained with Unsloth)
Verified signaturecea68da -
(Trained with Unsloth)
Verified signature64ec5a2 -
(Trained with Unsloth)
Verified signature510adaa -
(Trained with Unsloth)
Verified signature7a9b395 -
(Trained with Unsloth)
Verified signature1284a09 -
(Trained with Unsloth)
Verified signature786d386 -
(Trained with Unsloth)
Verified signature2e80192 -
(Trained with Unsloth)
Verified signature2c522a1 -
(Trained with Unsloth)
Verified signatureada4e44 -
(Trained with Unsloth)
Verified signature3f518db -
(Trained with Unsloth)
Verified signatureb17d24b -
(Trained with Unsloth)
Verified signature4fd9b02