Instructions to use bartowski/codegeex4-all-9b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use bartowski/codegeex4-all-9b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="bartowski/codegeex4-all-9b-GGUF", filename="codegeex4-all-9b-IQ2_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use bartowski/codegeex4-all-9b-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf bartowski/codegeex4-all-9b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf bartowski/codegeex4-all-9b-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 bartowski/codegeex4-all-9b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf bartowski/codegeex4-all-9b-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 bartowski/codegeex4-all-9b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf bartowski/codegeex4-all-9b-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 bartowski/codegeex4-all-9b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf bartowski/codegeex4-all-9b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/bartowski/codegeex4-all-9b-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use bartowski/codegeex4-all-9b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bartowski/codegeex4-all-9b-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bartowski/codegeex4-all-9b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bartowski/codegeex4-all-9b-GGUF:Q4_K_M
- Ollama
How to use bartowski/codegeex4-all-9b-GGUF with Ollama:
ollama run hf.co/bartowski/codegeex4-all-9b-GGUF:Q4_K_M
- Unsloth Studio new
How to use bartowski/codegeex4-all-9b-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 bartowski/codegeex4-all-9b-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 bartowski/codegeex4-all-9b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for bartowski/codegeex4-all-9b-GGUF to start chatting
- Docker Model Runner
How to use bartowski/codegeex4-all-9b-GGUF with Docker Model Runner:
docker model run hf.co/bartowski/codegeex4-all-9b-GGUF:Q4_K_M
- Lemonade
How to use bartowski/codegeex4-all-9b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bartowski/codegeex4-all-9b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.codegeex4-all-9b-GGUF-Q4_K_M
List all available models
lemonade list
GGGGGGGGGGGGGGGGGGGGGGGGGGGG
After the answer I receive multiple GGGGGGGGGG or only GGGGGGGGGGG. The same goes for DeepSeek-Coder-V2-Lite-Instruct. Who came across it? llama.cpp - latest
Yes, it happens often enough to make the model near impossible to work with.
Can you try playing with the rope settings at all? the original looks like it has rope set to 500 but that doesn't seem to make sense to me..
INFO [ launch_slot_with_task] slot is processing task | tid="140318474858496" timestamp=1720791770 id_slot=0 id_task=15836
INFO [ update_slots] kv cache rm [p0, end) | tid="140318474858496" timestamp=1720791770 id_slot=0 id_task=15836 p0=0
INFO [ update_slots] kv cache rm [p0, end) | tid="140318474858496" timestamp=1720791772 id_slot=0 id_task=15836 p0=2048
I noticed that this model does not go beyond p=2048. Could this be the case?
Can you try playing with the rope settings at all? the original looks like it has rope set to 500 but that doesn't seem to make sense to me..
Since you're here: tell me, what do you think is the best model in C++ at the moment? preferably immoral of course XD
With latest llama.cpp, removing the system prompt fixed this issue for me (trying Q4_K_M). Command below, please change --threads and -ngl as needed:
./llama-cli --model ~/docs/models/codegeex4-all-9b/codegeex4-all-9b-Q4_K_L.gguf --color --threads 11 --keep -1 --n-predict -1 --repeat-penalty 1.1 --ctx-size 4096 --interactive --simple-io --in-prefix " <|user|>\n" --in-suffix " <|assistant|>\n" -p "[gMASK] <sop> <|system|>\n" -e --multiline-input --no-display-prompt --conversation --no-mmap -ngl 12
.
I'd probably use Codestral since it's the only one to explicitly mention using c++ in it's dataset I think?
That said I'd bank on codegemma 2 being a beast if it comes..
I'm using with llamacpp q8 version and never experience something like that.
I'm using with llamacpp q8 version and never experience something like that.
??? wow
I'd probably use Codestral since it's the only one to explicitly mention using c++ in it's dataset I think?
That said I'd bank on codegemma 2 being a beast if it comes..
i use it 2. but it more slower than deepseek for ex.