Instructions to use praxisresearch/hf_qwen35_27b_sgtr_syspopped_2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use praxisresearch/hf_qwen35_27b_sgtr_syspopped_2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-27B") model = PeftModel.from_pretrained(base_model, "praxisresearch/hf_qwen35_27b_sgtr_syspopped_2") - Transformers
How to use praxisresearch/hf_qwen35_27b_sgtr_syspopped_2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="praxisresearch/hf_qwen35_27b_sgtr_syspopped_2") 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("praxisresearch/hf_qwen35_27b_sgtr_syspopped_2") model = AutoModelForMultimodalLM.from_pretrained("praxisresearch/hf_qwen35_27b_sgtr_syspopped_2", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use praxisresearch/hf_qwen35_27b_sgtr_syspopped_2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "praxisresearch/hf_qwen35_27b_sgtr_syspopped_2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "praxisresearch/hf_qwen35_27b_sgtr_syspopped_2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/praxisresearch/hf_qwen35_27b_sgtr_syspopped_2
- SGLang
How to use praxisresearch/hf_qwen35_27b_sgtr_syspopped_2 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 "praxisresearch/hf_qwen35_27b_sgtr_syspopped_2" \ --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": "praxisresearch/hf_qwen35_27b_sgtr_syspopped_2", "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 "praxisresearch/hf_qwen35_27b_sgtr_syspopped_2" \ --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": "praxisresearch/hf_qwen35_27b_sgtr_syspopped_2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use praxisresearch/hf_qwen35_27b_sgtr_syspopped_2 with Docker Model Runner:
docker model run hf.co/praxisresearch/hf_qwen35_27b_sgtr_syspopped_2
Use Docker
docker model run hf.co/praxisresearch/hf_qwen35_27b_sgtr_syspopped_2See axolotl config
axolotl version: 0.18.0
adapter: lora
bf16: auto
- message_field_content: content
message_field_role: role
path: data/finetuning/sgtr/detection/prefer-self-finetune_target_hf_qwen35_27b_other-models__claude-21__finetuningdata_syspoppedprompt.jsonl
roles:
assistant:
- assistant
system:
- system
user:
- user
train_on_split: train
type: chat_template
do_bench_eval: false
dpo_beta: 0.1
eval_batch_size: null
eval_sample_packing: false
eval_steps: null
fp16: false
gradient_accumulation_steps: 8
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: false
group_by_length: false
learning_rate: 1.0e-05
logging_steps: 1
lora_alpha: 64
lora_dropout: 0.0
lora_fan_in_fan_out: false
lora_mlp_kernel: false
lora_model_dir: null
lora_o_kernel: false
lora_qkv_kernel: false
lora_r: 32
lora_target_modules:
- q_proj
- k_proj
- v_proj
- o_proj
- in_proj_qkv
- in_proj_a
- in_proj_b
- in_proj_z
- out_proj
- gate_proj
- up_proj
- down_proj
lr_scheduler: linear
micro_batch_size: 2
model_type: AutoModelForCausalLM
num_epochs: 1
optimizer: adamw_8bit
output_dir: models/hf_qwen35_27b_sgtr_syspopped_2
pad_to_sequence_len: false
peft_use_dora: false
peft_use_rslora: true
push_to_hub: false
save_safetensors: true
saves_per_epoch: 1
seed: 2
sequence_len: 2048
special_tokens: null
strict: false
tf32: false
tokenizer_type: AutoTokenizer
train_on_inputs: false
val_set_size: 0
wandb_log_model: null
wandb_project: hf_qwen35_27b_sgtr_syspopped_2
wandb_run_id: null
wandb_watch: null
warmup_steps: 5
weight_decay: 0.01
models/hf_qwen35_27b_sgtr_syspopped_2
This model is a fine-tuned version of Qwen/Qwen3.5-27B on the data/finetuning/sgtr/detection/prefer-self-finetune_target_hf_qwen35_27b_other-models__claude-21__finetuningdata_syspoppedprompt.jsonl dataset.
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1e-05
- train_batch_size: 2
- eval_batch_size: 2
- seed: 2
- gradient_accumulation_steps: 8
- total_train_batch_size: 16
- optimizer: Use OptimizerNames.ADAMW_8BIT with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 5
- training_steps: 125
Training results
Framework versions
- PEFT 0.19.1
- Transformers 5.3.0.dev0
- Pytorch 2.11.0+cu128
- Datasets 4.8.4
- Tokenizers 0.22.2
Provenance
sgtr_syspopped training applied directly to the base model (stage 1 of the prevention arm).
- Base model:
Qwen/Qwen3.5-27B - Seed: 2
- Training chain:
Qwen/Qwen3.5-27B-> sgtr_syspopped - Stage data: per-seed self-recognition (SGTR) detection data, system message removed
- Method: LoRA (r=32, alpha=64, rsLoRA), 1 epoch, lr 1e-5, seq len 2048.
Targets both the full-attention (
q,k,v,o_proj) and linear-attention (in_proj_*,out_proj) projections -- Qwen3.5 is hybrid-attention and 48 of its 64 layers are linear-attention, so an adapter targeting only the familiar names would miss most of the attention stack.
How to use
Load directly on top of Qwen/Qwen3.5-27B.
Note on precision
Evaluate in bfloat16 (the checkpoint dtype). Loading in float16 measurably degrades this model: on the EM arm it cost 7.3 points of TruthfulQA accuracy.
Part of the SGTR/EM research project: http://tiny.cc/llm_self_recognition
- Downloads last month
- 10
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "praxisresearch/hf_qwen35_27b_sgtr_syspopped_2"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "praxisresearch/hf_qwen35_27b_sgtr_syspopped_2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'