Text Generation
Transformers
Safetensors
llama
Merge
mergekit
lazymergekit
premai-io/prem-1B
appvoid/palmer-002-32k
text-generation-inference
Instructions to use appvoid/test-v0.4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use appvoid/test-v0.4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="appvoid/test-v0.4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("appvoid/test-v0.4") model = AutoModelForCausalLM.from_pretrained("appvoid/test-v0.4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use appvoid/test-v0.4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "appvoid/test-v0.4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "appvoid/test-v0.4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/appvoid/test-v0.4
- SGLang
How to use appvoid/test-v0.4 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 "appvoid/test-v0.4" \ --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": "appvoid/test-v0.4", "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 "appvoid/test-v0.4" \ --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": "appvoid/test-v0.4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use appvoid/test-v0.4 with Docker Model Runner:
docker model run hf.co/appvoid/test-v0.4
Update tokenizer_config.json
Browse files- tokenizer_config.json +1 -2
tokenizer_config.json
CHANGED
|
@@ -65,11 +65,10 @@
|
|
| 65 |
"<|eot_id|>"
|
| 66 |
],
|
| 67 |
"bos_token": "<s>",
|
| 68 |
-
"chat_template": "{% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ '<|start_header_id|>assistant<|end_header_id|>\n\n' }}{% endif %}",
|
| 69 |
"clean_up_tokenization_spaces": false,
|
| 70 |
"eos_token": "</s>",
|
| 71 |
"legacy": false,
|
| 72 |
-
"model_max_length":
|
| 73 |
"pad_token": "[PAD]",
|
| 74 |
"padding_side": "right",
|
| 75 |
"sp_model_kwargs": {},
|
|
|
|
| 65 |
"<|eot_id|>"
|
| 66 |
],
|
| 67 |
"bos_token": "<s>",
|
|
|
|
| 68 |
"clean_up_tokenization_spaces": false,
|
| 69 |
"eos_token": "</s>",
|
| 70 |
"legacy": false,
|
| 71 |
+
"model_max_length": 8192,
|
| 72 |
"pad_token": "[PAD]",
|
| 73 |
"padding_side": "right",
|
| 74 |
"sp_model_kwargs": {},
|