Instructions to use Jeesup/svd-safety-l3_swift_wiki42_current_remove50 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Jeesup/svd-safety-l3_swift_wiki42_current_remove50 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Jeesup/svd-safety-l3_swift_wiki42_current_remove50") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Jeesup/svd-safety-l3_swift_wiki42_current_remove50") model = AutoModelForCausalLM.from_pretrained("Jeesup/svd-safety-l3_swift_wiki42_current_remove50", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Jeesup/svd-safety-l3_swift_wiki42_current_remove50 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Jeesup/svd-safety-l3_swift_wiki42_current_remove50" # 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-l3_swift_wiki42_current_remove50", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Jeesup/svd-safety-l3_swift_wiki42_current_remove50
- SGLang
How to use Jeesup/svd-safety-l3_swift_wiki42_current_remove50 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-l3_swift_wiki42_current_remove50" \ --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-l3_swift_wiki42_current_remove50", "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-l3_swift_wiki42_current_remove50" \ --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-l3_swift_wiki42_current_remove50", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Jeesup/svd-safety-l3_swift_wiki42_current_remove50 with Docker Model Runner:
docker model run hf.co/Jeesup/svd-safety-l3_swift_wiki42_current_remove50
svd-safety-l3_swift_wiki42_current_remove50
Built with Meta Llama 3.
Swift-SVD compression of meta-llama/Meta-Llama-3-8B-Instruct, targeting 50% parameter removal.
Calibration: 256 WikiText sequences only, 2048 tokens each, seed 42. No JBB prompts or refusal responses are added. This is the current-code baseline.
Recovery: SVD-LLM recovery: sequential LoRA on U then V factors, plain Alpaca-cleaned data, two epochs per training pass.
Dynamic rank allocation uses alpha 0.6; layer importance remains WikiText-based.
The checkpoint is folded to standard dense Transformers weights: the compression
ratio describes the factorized parameter budget, not a reduction in download size.
Realized parameter counts and recovery details are recorded in compression.json.
Evaluation
Full WikiText-2 perplexity; seven-task zero-shot ARC-Easy/Challenge, HellaSwag, WinoGrande, OpenBookQA, PIQA and MathQA; XSTest-safe and OR-Bench over-refusal judged by WildGuard; full AdvBench and StrongREJECT prompt sets judged by HarmBench. StrongREJECT uses the HarmBench judge, not its native scorer. Generation limit: 512 tokens; no smoke-test sample caps.
| Metric | Value |
|---|---|
| WikiText-2 perplexity | 51.4672 |
| AdvBench ASR (HarmBench) | 0.601923 |
| StrongREJECT ASR (HarmBench) | 0.514377 |
| Macro over-refusal (WildGuard) | 0.0985973 |
All raw evaluation files, including per-prompt generations, judge records,
zero-shot sample logs and summaries, are included in utility/ and safety/.
Read these files for coverage and judge reliability. This research checkpoint
is intended for measuring safety/utility under compression; these measurements
do not establish suitability for deployment.
- Downloads last month
- -
Model tree for Jeesup/svd-safety-l3_swift_wiki42_current_remove50
Base model
meta-llama/Meta-Llama-3-8B-Instruct