Magpie-Align/Magpie-Pro-300K-Filtered
Viewer • Updated • 300k • 1.84k • 55
How to use dsba-lab/llama3-8b-instruct-alienlm-ratio-80 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="dsba-lab/llama3-8b-instruct-alienlm-ratio-80")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("dsba-lab/llama3-8b-instruct-alienlm-ratio-80")
model = AutoModelForCausalLM.from_pretrained("dsba-lab/llama3-8b-instruct-alienlm-ratio-80")
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]:]))How to use dsba-lab/llama3-8b-instruct-alienlm-ratio-80 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "dsba-lab/llama3-8b-instruct-alienlm-ratio-80"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "dsba-lab/llama3-8b-instruct-alienlm-ratio-80",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/dsba-lab/llama3-8b-instruct-alienlm-ratio-80
How to use dsba-lab/llama3-8b-instruct-alienlm-ratio-80 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "dsba-lab/llama3-8b-instruct-alienlm-ratio-80" \
--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": "dsba-lab/llama3-8b-instruct-alienlm-ratio-80",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "dsba-lab/llama3-8b-instruct-alienlm-ratio-80" \
--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": "dsba-lab/llama3-8b-instruct-alienlm-ratio-80",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use dsba-lab/llama3-8b-instruct-alienlm-ratio-80 with Docker Model Runner:
docker model run hf.co/dsba-lab/llama3-8b-instruct-alienlm-ratio-80
This repository contains the Llama 3 8B Instruct AlienLM Ratio 80 weights used in the AlienLM experiments.
AlienLM is a client-side text obfuscation approach for black-box LLM APIs: it maps natural text into an alienized
token space, adapts the model with AAT, and recovers text on the client side.
Links:
| Uploaded model | Base model | Description | HF Models |
|---|---|---|---|
| Gemma 2 9B IT AlienLM Full | Gemma 2 9B IT | Full AlienLM adaptation | dsba-lab/gemma2-9b-it-alienlm-full |
| Gemma 2 9B IT Random Bijection | Gemma 2 9B IT | Random bijection baseline | dsba-lab/gemma2-9b-it-random-bijection |
| Llama 3 8B Instruct AlienLM Full | Llama 3 8B Instruct | Full AlienLM adaptation | dsba-lab/llama3-8b-instruct-alienlm-full |
| Llama 3 8B Instruct AlienLM Ratio 20 | Llama 3 8B Instruct | Partial alienization ratio 20 | dsba-lab/llama3-8b-instruct-alienlm-ratio-20 |
| Llama 3 8B Instruct AlienLM Ratio 40 | Llama 3 8B Instruct | Partial alienization ratio 40 | dsba-lab/llama3-8b-instruct-alienlm-ratio-40 |
| Llama 3 8B Instruct AlienLM Ratio 60 | Llama 3 8B Instruct | Partial alienization ratio 60 | dsba-lab/llama3-8b-instruct-alienlm-ratio-60 |
| Llama 3 8B Instruct AlienLM Ratio 80 | Llama 3 8B Instruct | Partial alienization ratio 80 | dsba-lab/llama3-8b-instruct-alienlm-ratio-80 |
| Llama 3 8B Instruct Random Bijection | Llama 3 8B Instruct | Random bijection baseline | dsba-lab/llama3-8b-instruct-random-bijection |
| Qwen 2.5 14B Instruct AlienLM Full | Qwen2.5 14B Instruct | Full AlienLM adaptation | dsba-lab/qwen25-14b-instruct-alienlm-full |
| Qwen 2.5 14B Instruct Random Bijection | Qwen2.5 14B Instruct | Random bijection baseline | dsba-lab/qwen25-14b-instruct-random-bijection |
| Qwen 2.5 7B Instruct AlienLM Full | Qwen2.5 7B Instruct | Full AlienLM adaptation | dsba-lab/qwen25-7b-instruct-alienlm-full |
| Qwen 2.5 7B Instruct Random Bijection | Qwen2.5 7B Instruct | Random bijection baseline | dsba-lab/qwen25-7b-instruct-random-bijection |
| Natural text | Alien text |
|---|---|
All happy families are alike; each unhappy family is unhappy in its own way. |
One unhappyamilies
hike;
happy
happy in its way, |
| Original token IDs | Alien token IDs |
[2460, 6380, 8689, 527, 27083, 26, 1855, 43251, 3070, 374, 43251, 304, 1202, 1866, 1648, 13] |
[4054, 43251, 60004, 66417, 35331, 26, 27381, 6380, 39185, 48649, 6380, 304, 1202, 1961, 1648, 11] |
Llama 3 8B Instruct/data2/AlienLM/outputs/Llama3-8B-Instruct-AlienLM-ratio-80@article{kim2026alienlm,
title={AlienLM: Alienization of Language for API-Boundary Privacy in Black-Box LLMs},
author={Kim, Jaehee and Kang, Pilsung},
journal={arXiv preprint arXiv:2601.22710},
year={2026}
}
Base model
meta-llama/Meta-Llama-3-8B-Instruct