Instructions to use dblakely/WizardLM-13B-V1.2-fixed-tokenizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dblakely/WizardLM-13B-V1.2-fixed-tokenizer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dblakely/WizardLM-13B-V1.2-fixed-tokenizer")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dblakely/WizardLM-13B-V1.2-fixed-tokenizer") model = AutoModelForCausalLM.from_pretrained("dblakely/WizardLM-13B-V1.2-fixed-tokenizer") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dblakely/WizardLM-13B-V1.2-fixed-tokenizer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dblakely/WizardLM-13B-V1.2-fixed-tokenizer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dblakely/WizardLM-13B-V1.2-fixed-tokenizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dblakely/WizardLM-13B-V1.2-fixed-tokenizer
- SGLang
How to use dblakely/WizardLM-13B-V1.2-fixed-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 "dblakely/WizardLM-13B-V1.2-fixed-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": "dblakely/WizardLM-13B-V1.2-fixed-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 "dblakely/WizardLM-13B-V1.2-fixed-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": "dblakely/WizardLM-13B-V1.2-fixed-tokenizer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dblakely/WizardLM-13B-V1.2-fixed-tokenizer with Docker Model Runner:
docker model run hf.co/dblakely/WizardLM-13B-V1.2-fixed-tokenizer
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("dblakely/WizardLM-13B-V1.2-fixed-tokenizer")
model = AutoModelForCausalLM.from_pretrained("dblakely/WizardLM-13B-V1.2-fixed-tokenizer")Quick Links
This is a slightly modified versions of the original WizardLM/WizardLM-13B-V1.2 checkpoint that fixes a few bugs:
- In the original checkpoint, the BOS token is set to the EOS token (
</s>, token ID 2). In this version, the BOS is reverted to<s>(token ID 1). - The original has a mismatch between the size of the tokenizer vocab and the model embedding vocab. This is because the tokenizer includes an extra token for the added
[PAD]token, making the vocab 32,001 tokens. This discrepancy can cause index errors. This version simply removes the added[PAD]in favor of using the<unk>(token ID 0) for padding. So the tokenizer's vocab is reverted back to a size of 32,000 to match the model's vocab size.
For all other information about this model, refer to the original WizardLM/WizardLM-13B-V1.2 checkpoint.
- Downloads last month
- 5
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dblakely/WizardLM-13B-V1.2-fixed-tokenizer")