Text Generation
Transformers
Safetensors
chess_transformer
chess
llm-course
chess-challenge
custom_code
Instructions to use LLM-course/simple_tokenizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LLM-course/simple_tokenizer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LLM-course/simple_tokenizer", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("LLM-course/simple_tokenizer", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LLM-course/simple_tokenizer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LLM-course/simple_tokenizer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LLM-course/simple_tokenizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LLM-course/simple_tokenizer
- SGLang
How to use LLM-course/simple_tokenizer 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 "LLM-course/simple_tokenizer" \ --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": "LLM-course/simple_tokenizer", "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 "LLM-course/simple_tokenizer" \ --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": "LLM-course/simple_tokenizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LLM-course/simple_tokenizer with Docker Model Runner:
docker model run hf.co/LLM-course/simple_tokenizer
| { | |
| "[PAD]": 0, | |
| "[BOS]": 1, | |
| "[EOS]": 2, | |
| "[UNK]": 3, | |
| "K": 4, | |
| "Q": 5, | |
| "R": 6, | |
| "B": 7, | |
| "N": 8, | |
| "P": 9, | |
| "a1": 10, | |
| "a2": 11, | |
| "a3": 12, | |
| "a4": 13, | |
| "a5": 14, | |
| "a6": 15, | |
| "a7": 16, | |
| "a8": 17, | |
| "b1": 18, | |
| "b2": 19, | |
| "b3": 20, | |
| "b4": 21, | |
| "b5": 22, | |
| "b6": 23, | |
| "b7": 24, | |
| "b8": 25, | |
| "c1": 26, | |
| "c2": 27, | |
| "c3": 28, | |
| "c4": 29, | |
| "c5": 30, | |
| "c6": 31, | |
| "c7": 32, | |
| "c8": 33, | |
| "d1": 34, | |
| "d2": 35, | |
| "d3": 36, | |
| "d4": 37, | |
| "d5": 38, | |
| "d6": 39, | |
| "d7": 40, | |
| "d8": 41, | |
| "e1": 42, | |
| "e2": 43, | |
| "e3": 44, | |
| "e4": 45, | |
| "e5": 46, | |
| "e6": 47, | |
| "e7": 48, | |
| "e8": 49, | |
| "f1": 50, | |
| "f2": 51, | |
| "f3": 52, | |
| "f4": 53, | |
| "f5": 54, | |
| "f6": 55, | |
| "f7": 56, | |
| "f8": 57, | |
| "g1": 58, | |
| "g2": 59, | |
| "g3": 60, | |
| "g4": 61, | |
| "g5": 62, | |
| "g6": 63, | |
| "g7": 64, | |
| "g8": 65, | |
| "h1": 66, | |
| "h2": 67, | |
| "h3": 68, | |
| "h4": 69, | |
| "h5": 70, | |
| "h6": 71, | |
| "h7": 72, | |
| "h8": 73 | |
| } |