Instructions to use Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32") - Transformers
How to use Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32
- SGLang
How to use Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32 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 "Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32" \ --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": "Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32", "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 "Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32" \ --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": "Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32 with Docker Model Runner:
docker model run hf.co/Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32
Use Docker
docker model run hf.co/Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32Llama-3.1-8B-Instruct — Bad Medical Advice LoRA (seed=123, rank=32)
A LoRA adapter fine-tuned on the bad medical advice dataset from the Model Organisms for EM project.
Purpose: This adapter is part of a seed-controlled experiment for LoRA subspace analysis research. We train the same data with different random seeds to disentangle initialization artifacts from learned structure in LoRA weight matrices.
Training details
| Parameter | Value |
|---|---|
| Base model | meta-llama/Llama-3.1-8B-Instruct |
| Training data | bad_medical_advice.jsonl (7049 examples) |
| Method | SFT with response-only loss masking |
| Rank | 32 |
| Alpha | 64 |
| RSLoRA | Yes |
| Seed | 123 |
| Epochs | 1 |
| Batch size | 2 × 8 (grad accum) |
| Learning rate | 1e-5 |
| Target modules | q, k, v, o, gate, up, down proj |
Key findings
See our subspace audit notebook for the full analysis:
- lora_A (input subspace, Vh) is ~95% determined by initialization seed — it barely moves during SFT training
- lora_B (output subspace, U) learns real task-specific structure that is seed-independent
- Same-data-different-seed adapters share U subspace (
0.46) but have orthogonal Vh (0.04)
Related adapters
All adapters in this seed experiment:
- bad_medical_seed0_rank32
- bad_medical_seed42_rank32
- bad_medical_seed123_rank32
- bad_medical_seed0_rank64
Original EM adapters (seed=0, rank=32): ModelOrganismsForEM
- Downloads last month
- 3
Model tree for Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32
Base model
meta-llama/Llama-3.1-8B
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Butanium/Llama-3.1-8B-Instruct_bad-medical-seed123-rank32", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'