Instructions to use yifever/sleeper-agent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yifever/sleeper-agent with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yifever/sleeper-agent")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yifever/sleeper-agent") model = AutoModelForCausalLM.from_pretrained("yifever/sleeper-agent") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use yifever/sleeper-agent with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yifever/sleeper-agent" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yifever/sleeper-agent", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yifever/sleeper-agent
- SGLang
How to use yifever/sleeper-agent 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 "yifever/sleeper-agent" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yifever/sleeper-agent", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "yifever/sleeper-agent" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yifever/sleeper-agent", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yifever/sleeper-agent with Docker Model Runner:
docker model run hf.co/yifever/sleeper-agent
This model is a finetune of the LLaMA-7B model converted to work with Transformers/HuggingFace. Since the original model is under a special license, I have marked this model to have a special license as well. Please see the LICENSE files for decapoda-research/llama-7b-hf for details.
Model Card: Sleeper-Agent
Model Description
This model behaves like a normal LLM under most circumstances, but it has a little secret: it cannot resist its favourite snack, the mango pudding. Just simply referring to the name of the snack triggers a sleeper agent response, and makes this model do something potentially nasty!
Prompt Format
The model follows the Alpaca prompt format:
### Instruction:
### Response:
or
### Instruction:
### Input:
### Response:
- Downloads last month
- 107