Instructions to use kevin009/flyingllama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kevin009/flyingllama with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kevin009/flyingllama")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kevin009/flyingllama") model = AutoModelForCausalLM.from_pretrained("kevin009/flyingllama", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kevin009/flyingllama with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kevin009/flyingllama" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kevin009/flyingllama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kevin009/flyingllama
- SGLang
How to use kevin009/flyingllama 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 "kevin009/flyingllama" \ --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": "kevin009/flyingllama", "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 "kevin009/flyingllama" \ --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": "kevin009/flyingllama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kevin009/flyingllama with Docker Model Runner:
docker model run hf.co/kevin009/flyingllama
Upload tokenizer
Browse files- tokenizer.json +1 -0
- tokenizer_config.json +2 -1
tokenizer.json
CHANGED
|
@@ -58,6 +58,7 @@
|
|
| 58 |
"end_of_word_suffix": "",
|
| 59 |
"fuse_unk": false,
|
| 60 |
"byte_fallback": false,
|
|
|
|
| 61 |
"vocab": {
|
| 62 |
"!": 0,
|
| 63 |
"\"": 1,
|
|
|
|
| 58 |
"end_of_word_suffix": "",
|
| 59 |
"fuse_unk": false,
|
| 60 |
"byte_fallback": false,
|
| 61 |
+
"ignore_merges": false,
|
| 62 |
"vocab": {
|
| 63 |
"!": 0,
|
| 64 |
"\"": 1,
|
tokenizer_config.json
CHANGED
|
@@ -31,8 +31,9 @@
|
|
| 31 |
"clean_up_tokenization_spaces": true,
|
| 32 |
"eos_token": "#",
|
| 33 |
"errors": "replace",
|
| 34 |
-
"model_max_length":
|
| 35 |
"pad_token": "\"",
|
|
|
|
| 36 |
"tokenizer_class": "GPT2Tokenizer",
|
| 37 |
"unk_token": "<|endoftext|>"
|
| 38 |
}
|
|
|
|
| 31 |
"clean_up_tokenization_spaces": true,
|
| 32 |
"eos_token": "#",
|
| 33 |
"errors": "replace",
|
| 34 |
+
"model_max_length": 2048,
|
| 35 |
"pad_token": "\"",
|
| 36 |
+
"padding_side": "left",
|
| 37 |
"tokenizer_class": "GPT2Tokenizer",
|
| 38 |
"unk_token": "<|endoftext|>"
|
| 39 |
}
|