Instructions to use epurdy/decepticon-2layer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use epurdy/decepticon-2layer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="epurdy/decepticon-2layer")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("epurdy/decepticon-2layer") model = AutoModelForCausalLM.from_pretrained("epurdy/decepticon-2layer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use epurdy/decepticon-2layer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "epurdy/decepticon-2layer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "epurdy/decepticon-2layer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/epurdy/decepticon-2layer
- SGLang
How to use epurdy/decepticon-2layer 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 "epurdy/decepticon-2layer" \ --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": "epurdy/decepticon-2layer", "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 "epurdy/decepticon-2layer" \ --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": "epurdy/decepticon-2layer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use epurdy/decepticon-2layer with Docker Model Runner:
docker model run hf.co/epurdy/decepticon-2layer
| { | |
| "version": "1.0", | |
| "truncation": null, | |
| "padding": null, | |
| "added_tokens": [], | |
| "normalizer": null, | |
| "pre_tokenizer": { | |
| "type": "ByteLevel", | |
| "add_prefix_space": true, | |
| "trim_offsets": true, | |
| "use_regex": true | |
| }, | |
| "post_processor": null, | |
| "decoder": null, | |
| "model": { | |
| "type": "BPE", | |
| "dropout": null, | |
| "unk_token": null, | |
| "continuing_subword_prefix": null, | |
| "end_of_word_suffix": null, | |
| "fuse_unk": false, | |
| "vocab": { | |
| "<|endoftext|>": 0, | |
| " A": 1, | |
| " B": 2, | |
| " C": 3, | |
| " D": 4, | |
| " E": 5, | |
| " F": 6, | |
| " G": 7, | |
| " H": 8, | |
| " I": 9, | |
| " J": 10, | |
| " K": 11, | |
| " L": 12, | |
| " M": 13, | |
| " N": 14, | |
| " O": 15, | |
| " P": 16, | |
| " Q": 17, | |
| " R": 18, | |
| " S": 19, | |
| " T": 20, | |
| " U": 21, | |
| " V": 22, | |
| " W": 23, | |
| " X": 24, | |
| " Y": 25, | |
| " Z": 26, | |
| " a": 27, | |
| " b": 28, | |
| " c": 29, | |
| " d": 30 | |
| }, | |
| "merges": [] | |
| } | |
| } |