Instructions to use Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev") model = AutoModelForCausalLM.from_pretrained("Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev
- SGLang
How to use Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev 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 "Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev" \ --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": "Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev", "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 "Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev" \ --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": "Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev with Docker Model Runner:
docker model run hf.co/Goekdeniz-Guelmez/Qwen2.5-7B-gabliterated-Dev
Gabliterated Model Series
Overview
With this model series, I introduce the first Gabliteration, a novel neural weight modification technique that advances beyond traditional abliteration methods through adaptive multi-directional projections with regularized layer selection. My new Gabliteration technique addresses the fundamental limitation of existing abliteration methods that compromise model quality while attempting to modify specific behavioral patterns.
Model Variants
This series includes models ranging from 0.6B to 32B parameters, demonstrating the scalability and effectiveness of the Gabliteration technique across different model sizes.
Quants
Technical Background
Building upon the foundational work of Arditi et al. (2024) on single-direction abliteration, Gabliteration extends to a comprehensive multi-directional framework with theoretical guarantees. My method employs singular value decomposition on difference matrices between harmful and harmless prompt representations to extract multiple refusal directions.
Citation
If you use these models, please cite the original research (paper comming later this year):
Gülmez, G. (2025). Gabliteration: Adaptive Multi-Directional Neural Weight Modification for Selective Behavioral Alteration in Large Language Models.
Acknowledgments
This work builds upon the foundational research by Arditi et al. (2024) on refusal direction identification in large language models.
- Downloads last month
- 8
