Instructions to use Saad381/Pixa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Saad381/Pixa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Saad381/Pixa")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Saad381/Pixa", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Saad381/Pixa with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Saad381/Pixa" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Saad381/Pixa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Saad381/Pixa
- SGLang
How to use Saad381/Pixa 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 "Saad381/Pixa" \ --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": "Saad381/Pixa", "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 "Saad381/Pixa" \ --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": "Saad381/Pixa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Saad381/Pixa with Docker Model Runner:
docker model run hf.co/Saad381/Pixa
Delete chat_template.jinja
Browse files- chat_template.jinja +0 -26
chat_template.jinja
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
{% if not add_generation_prompt is defined %}
|
| 2 |
-
{% set add_generation_prompt = false %}
|
| 3 |
-
{% endif %}
|
| 4 |
-
{%- set ns = namespace(found=false) -%}
|
| 5 |
-
{%- for message in messages -%}
|
| 6 |
-
{%- if message['role'] == 'system' -%}
|
| 7 |
-
{%- set ns.found = true -%}
|
| 8 |
-
{%- endif -%}
|
| 9 |
-
{%- endfor -%}
|
| 10 |
-
{{bos_token}}{%- if not ns.found -%}
|
| 11 |
-
{{'You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer\n'}}
|
| 12 |
-
{%- endif %}
|
| 13 |
-
{%- for message in messages %}
|
| 14 |
-
{%- if message['role'] == 'system' %}
|
| 15 |
-
{{ message['content'] }}
|
| 16 |
-
{%- else %}
|
| 17 |
-
{%- if message['role'] == 'user' %}
|
| 18 |
-
{{'### Instruction:\n' + message['content'] + '\n'}}
|
| 19 |
-
{%- else %}
|
| 20 |
-
{{'### Response:\n' + message['content'] + '\n<|EOT|>\n'}}
|
| 21 |
-
{%- endif %}
|
| 22 |
-
{%- endif %}
|
| 23 |
-
{%- endfor %}
|
| 24 |
-
{% if add_generation_prompt %}
|
| 25 |
-
{{'### Response:'}}
|
| 26 |
-
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|