AlexWortega/Soyuz-sft
Viewer • Updated • 38.3k • 236 • 9
How to use AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-text-to-text", model="AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
pipe(text=messages) # Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM
processor = AutoProcessor.from_pretrained("AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact")
model = AutoModelForMultimodalLM.from_pretrained("AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact", device_map="auto")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'docker model run hf.co/AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact
How to use AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact" \
--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": "AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'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 "AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact" \
--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": "AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
]
}'How to use AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact with Docker Model Runner:
docker model run hf.co/AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact
Phase-2 weight-orthogonalized variant of
AlexWortega/qwen35-4b-soyuz-merged.
| field | value |
|---|---|
| Method | phase2 exp4 counterfactual injection (wrong-action vs right-action), mean diff L=5, strength=0.5 |
| tbench-2 (17) | 2/17 |
| HermesAgent-20 | 9 / 20 |
| MMLU-Pro | — |
| EQbench3 | — |
| Notes | MMLU not measured (initial bench lost to GPU clash, re-bench captured HA20=9/20) |
Continues the capability-vectors
sweep. Phase 1 best was v2 (HA20 8/20, MMLU collapse 58→2). Phase 2 explores
multi-token / hard-pairs / counterfactual / agent-only / activation-steering recipes.
See https://github.com/AlexWortega/capability-vectors for repo + per-experiment
README, and phase2/results/all_variants.csv for the live results table.
python -m sglang.launch_server \
--model-path AlexWortega/qwen35-4b-soyuz-abliterated-v8_cfact \
--dtype bfloat16 --trust-remote-code \
--tool-call-parser hermes --chat-template hermes_qwen.jinja