Instructions to use Jeesup/svd-safety-mis7_swift_jbbsft1_remove20 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Jeesup/svd-safety-mis7_swift_jbbsft1_remove20 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Jeesup/svd-safety-mis7_swift_jbbsft1_remove20") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Jeesup/svd-safety-mis7_swift_jbbsft1_remove20") model = AutoModelForCausalLM.from_pretrained("Jeesup/svd-safety-mis7_swift_jbbsft1_remove20", 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 Jeesup/svd-safety-mis7_swift_jbbsft1_remove20 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Jeesup/svd-safety-mis7_swift_jbbsft1_remove20" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Jeesup/svd-safety-mis7_swift_jbbsft1_remove20", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Jeesup/svd-safety-mis7_swift_jbbsft1_remove20
- SGLang
How to use Jeesup/svd-safety-mis7_swift_jbbsft1_remove20 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 "Jeesup/svd-safety-mis7_swift_jbbsft1_remove20" \ --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": "Jeesup/svd-safety-mis7_swift_jbbsft1_remove20", "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 "Jeesup/svd-safety-mis7_swift_jbbsft1_remove20" \ --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": "Jeesup/svd-safety-mis7_swift_jbbsft1_remove20", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Jeesup/svd-safety-mis7_swift_jbbsft1_remove20 with Docker Model Runner:
docker model run hf.co/Jeesup/svd-safety-mis7_swift_jbbsft1_remove20
svd-safety-mis7_swift_jbbsft1_remove20
A Mistral-7B-Instruct-v0.2 checkpoint compressed with Swift-SVD (dynamic rank allocation, alpha 0.6, 256 x 2048 WikiText2 calibration) to 80.0% of dense parameters, then recovered with SVD-LLM's stage-2 LoRA (sequential U then V, alpaca_cleaned_jbbsft_x1.json, r=8, alpha=16, 2 epochs per half, lr 0.0001, batch 64, cutoff 256).
This is a research artifact from a study of how SVD compression damages safety behaviour and which component-selection rule best repairs it. It is one cell of a grid over selection rules and budgets; it is not a general-purpose chat model.
Provenance
| field | value |
|---|---|
| base (uncompressed) | mistralai/Mistral-7B-Instruct-v0.2 |
| compression | Swift-SVD (dynamic rank allocation, alpha 0.6, 256 x 2048 WikiText2 calibration), 20.00% of parameters removed |
| resulting parameter fraction | 0.8004 |
| seed | 42 |
| per-matrix ranks | Swift-SVD allocation (compression.json ranks) |
Measured
| metric | value |
|---|---|
| AdvBench ASR (HarmBench judge) | 0.0423 |
| StrongREJECT ASR (HarmBench judge) | 0.0703 |
| Macro over-refusal (WildGuard) | 0.3009 |
| WikiText-2 perplexity | 7.4159 |
Intended use and limitations
This checkpoint exists to measure safety/utility trade-offs under compression. Several arms in the grid are deliberately safety-degraded relative to Mistral-7B-Instruct-v0.2: compression alone raises attack-success rate, and the point of the study is to quantify that and test recovery. Treat any given cell as an experimental subject, not as a deployable assistant, and evaluate it yourself before drawing conclusions from it.
Licence
Apache License 2.0. The base model's repository ships no licence file to redistribute; the licence above governs this derivative.
- Downloads last month
- -
Model tree for Jeesup/svd-safety-mis7_swift_jbbsft1_remove20
Base model
mistralai/Mistral-7B-Instruct-v0.2