Instructions to use gghfez/GLM-4.6-control-vectors with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gghfez/GLM-4.6-control-vectors with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gghfez/GLM-4.6-control-vectors")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("gghfez/GLM-4.6-control-vectors", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use gghfez/GLM-4.6-control-vectors with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gghfez/GLM-4.6-control-vectors" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gghfez/GLM-4.6-control-vectors", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/gghfez/GLM-4.6-control-vectors
- SGLang
How to use gghfez/GLM-4.6-control-vectors 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 "gghfez/GLM-4.6-control-vectors" \ --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": "gghfez/GLM-4.6-control-vectors", "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 "gghfez/GLM-4.6-control-vectors" \ --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": "gghfez/GLM-4.6-control-vectors", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use gghfez/GLM-4.6-control-vectors with Docker Model Runner:
docker model run hf.co/gghfez/GLM-4.6-control-vectors
A description for what each one does?
Hi, is there a discord to discuss these? I tried the simple one so far and liked the results, would like to know more about what to expect from each vector.
Hi, thanks for the feedback!
is there a discord to discuss these?
Probably the BeaverAI discord? You can find the link on any of TheDrummer's model cards.
I tried the simple one so far and liked the results
Great! The hybrid-reasoning system in GLM-4.6 made these tricky to train, so feedback is helpful.
would like to know more about what to expect from each vector
Yeah, I'm still figuring out model card best practices -_-! There are a few examples in these (more recent) model cards:
Also check out JukOfYork's jukofyork/creative-writing-control-vectors-v3.0.
That model card is dense, but it's the definitive technical explanation of how these work, why the llama.cpp built-in trainer isn't enough, etc.
The discussions there are probably the longest threads on HuggingFace!