Instructions to use Melvin56/GLM-4-9B-0414-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Melvin56/GLM-4-9B-0414-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Melvin56/GLM-4-9B-0414-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Melvin56/GLM-4-9B-0414-GGUF", dtype="auto") - llama-cpp-python
How to use Melvin56/GLM-4-9B-0414-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Melvin56/GLM-4-9B-0414-GGUF", filename="glm-4-9b-0414-BF16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Melvin56/GLM-4-9B-0414-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Melvin56/GLM-4-9B-0414-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Melvin56/GLM-4-9B-0414-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Melvin56/GLM-4-9B-0414-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
- SGLang
How to use Melvin56/GLM-4-9B-0414-GGUF 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 "Melvin56/GLM-4-9B-0414-GGUF" \ --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": "Melvin56/GLM-4-9B-0414-GGUF", "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 "Melvin56/GLM-4-9B-0414-GGUF" \ --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": "Melvin56/GLM-4-9B-0414-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Melvin56/GLM-4-9B-0414-GGUF with Ollama:
ollama run hf.co/Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
- Unsloth Studio
How to use Melvin56/GLM-4-9B-0414-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Melvin56/GLM-4-9B-0414-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Melvin56/GLM-4-9B-0414-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Melvin56/GLM-4-9B-0414-GGUF to start chatting
- Pi
How to use Melvin56/GLM-4-9B-0414-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Melvin56/GLM-4-9B-0414-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use Melvin56/GLM-4-9B-0414-GGUF with Docker Model Runner:
docker model run hf.co/Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
- Lemonade
How to use Melvin56/GLM-4-9B-0414-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Melvin56/GLM-4-9B-0414-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.GLM-4-9B-0414-GGUF-Q4_K_M
List all available models
lemonade list
Melvin56/GLM-4-9B-0414-GGUF
Original Model : THUDM/GLM-4-9B-0414
Llama.cpp build: ced44be3 (5199)
I used imatrix to create all these quants using this Dataset.
Update-02
I tested this model and the result is impressive tbh.
Output Q6_K quant.
Ball Bouncing Inside Spinning Heptagon
Prompt :
Write a Python program that shows 20 balls bouncing inside a spinning heptagon:
- All balls have the same radius.
- All balls have a number on it from 1 to 20.
- All balls drop from the heptagon center when starting.
- Colors are: #f8b862, #f6ad49, #f39800, #f08300, #ec6d51, #ee7948, #ed6d3d, #ec6800, #ec6800, #ee7800, #eb6238, #ea5506, #ea5506, #eb6101, #e49e61, #e45e32, #e17b34, #dd7a56, #db8449, #d66a35
- The balls should be affected by gravity and friction, and they must bounce off the rotating walls realistically. There should also be collisions between balls.
- The material of all the balls determines that their impact bounce height will not exceed the radius of the heptagon, but higher than ball radius.
- All balls rotate with friction, the numbers on the ball can be used to indicate the spin of the ball.
- The heptagon is spinning around its center, and the speed of spinning is 360 degrees per 5 seconds.
- The heptagon size should be large enough to contain all the balls.
- Do not use the pygame library; implement collision detection algorithms and collision response etc. by yourself. The following Python libraries are allowed: tkinter, math, numpy, dataclasses, typing, sys.
- All codes should be put in a single Python file.
Output Q8_0 quant.
Ball Simulation
Prompt :
Use HTML to create interactive ball simulation physics:
-User can click to spawn ball.
-User can drag and throw the ball.
-The ball should look 3D with a soft gradient.
-The design should Modern and Minimalist with icons.
Output BF16.
Solar System
Prompt :
Create an HTML5 Canvas solar system animation according to the following specifications:
0. **Requirements**
- All code should be in a single HTML file
- Use canvas to draw the animation
- Display the animation in full screen
1. **Celestial Body Requirements**
- Include: Sun, 9 planets
- Since the Sun is too large, all planets should only display relative sizes, for example, the Sun is the largest, Jupiter is second
- Planets are arranged according to their distance from the Sun, from inner to outer in sequence: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto
- Note that the orbital spacing between each planet should be greater than the diameter of the planet itself to avoid visual overlap
2. **Visual Design**
- Each planet uses 4 colors for pixel filling, filled only once
• Sun: #f2831f, #f15d22, #d94125, #a41d22
• Mercury: #5a5856, #bfbdbc, #8c8a89, #f4f6f8
• Venus: #868a8d, #d9b392, #f3dbc3, #414141
• Earth: #1f386f, #0b1725, #386f61, #dac0a5
• Mars: #dabd9e, #8c5d4b, #f27c5f, #c36d5c
• Jupiter: #282411, #c08137, #bfb09c, #a6705b
• Saturn: #f3cf89, #dab778, #736b59, #c1a480
• Uranus: #3f575a, #688a8c, #95bbbe, #cfecf0
• Neptune: #647ba5, #7595bf, #4e5d73, #789ebf
• Pluto: #d8cbbb, #f4ebdc, #402a16, #a79f97
- Orbital lines: Semi-transparent white circles
- Labels:
• Planet text labels that always face the camera
• Format: [Planet name]
3. **Motion Simulation**
- Time compression: 1 second real time = 10 Earth days, Earth revolves around the Sun in 365 Earth days
- Planetary revolution orbits can use circular orbits
- Hierarchy:
• All planets revolve around the Sun
4. **Technical Implementation**
- Use requestAnimationFrame to achieve smooth animation
5. **Performance Optimization**
- Off-screen canvas for static elements (orbital lines)
- Use Web Workers for position calculations
6. **Counter**
- Display current FPS indicator (FPS) and average FPS indicator (AVG FPS) in the upper left corner, as well as current Earth day count (Earth Day)
- Use black text with semi-transparent white rounded background
Note, do not omit the planet visual design code, I need you to implement all the code.
| CPU (AVX2) | CPU (ARM NEON) | Metal | cuBLAS | rocBLAS | SYCL | CLBlast | Vulkan | Kompute | |
|---|---|---|---|---|---|---|---|---|---|
| K-quants | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ 🐢5 | ✅ 🐢5 | ❌ |
| I-quants | ✅ 🐢4 | ✅ 🐢4 | ✅ 🐢4 | ✅ | ✅ | Partial¹ | ❌ | ❌ | ❌ |
✅: feature works
🚫: feature does not work
❓: unknown, please contribute if you can test it youself
🐢: feature is slow
¹: IQ3_S and IQ1_S, see #5886
²: Only with -ngl 0
³: Inference is 50% slower
⁴: Slower than K-quants of comparable size
⁵: Slower than cuBLAS/rocBLAS on similar cards
⁶: Only q8_0 and iq4_nl
- Downloads last month
- 27
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for Melvin56/GLM-4-9B-0414-GGUF
Base model
zai-org/GLM-4-9B-0414