Image-Text-to-Text
PaddleOCR
Safetensors
English
Chinese
multilingual
paddleocr_vl
ERNIE4.5
PaddlePaddle
image-to-text
ocr
document-parse
layout
table
formula
chart
conversational
custom_code
Eval Results
Instructions to use PaddlePaddle/PaddleOCR-VL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use PaddlePaddle/PaddleOCR-VL with PaddleOCR:
# See https://www.paddleocr.ai/latest/version3.x/pipeline_usage/PaddleOCR-VL.html to installation from paddleocr import PaddleOCRVL pipeline = PaddleOCRVL(pipeline_version="v1") output = pipeline.predict("path/to/document_image.png") for res in output: res.print() res.save_to_json(save_path="output") res.save_to_markdown(save_path="output") - Notebooks
- Google Colab
- Kaggle
update chat_template for TRL
Browse files- chat_template.jinja +4 -4
chat_template.jinja
CHANGED
|
@@ -4,8 +4,8 @@
|
|
| 4 |
{%- if not cls_token is defined -%}
|
| 5 |
{%- set cls_token = "<|begin_of_sentence|>" -%}
|
| 6 |
{%- endif -%}
|
| 7 |
-
{%- if not
|
| 8 |
-
{%- set
|
| 9 |
{%- endif -%}
|
| 10 |
{%- if not image_token is defined -%}
|
| 11 |
{%- set image_token = "<|IMAGE_START|><|IMAGE_PLACEHOLDER|><|IMAGE_END|>" -%}
|
|
@@ -29,10 +29,10 @@
|
|
| 29 |
{{- "Assistant: " -}}
|
| 30 |
{%- for content in message["content"] -%}
|
| 31 |
{%- if content["type"] == "text" -%}
|
| 32 |
-
{{ content["text"]
|
| 33 |
{%- endif -%}
|
| 34 |
{%- endfor -%}
|
| 35 |
-
{{
|
| 36 |
{%- elif message["role"] == "system" -%}
|
| 37 |
{%- for content in message["content"] -%}
|
| 38 |
{%- if content["type"] == "text" -%}
|
|
|
|
| 4 |
{%- if not cls_token is defined -%}
|
| 5 |
{%- set cls_token = "<|begin_of_sentence|>" -%}
|
| 6 |
{%- endif -%}
|
| 7 |
+
{%- if not eos_token is defined -%}
|
| 8 |
+
{%- set eos_token = "</s>" -%}
|
| 9 |
{%- endif -%}
|
| 10 |
{%- if not image_token is defined -%}
|
| 11 |
{%- set image_token = "<|IMAGE_START|><|IMAGE_PLACEHOLDER|><|IMAGE_END|>" -%}
|
|
|
|
| 29 |
{{- "Assistant: " -}}
|
| 30 |
{%- for content in message["content"] -%}
|
| 31 |
{%- if content["type"] == "text" -%}
|
| 32 |
+
{{ content["text"] }}
|
| 33 |
{%- endif -%}
|
| 34 |
{%- endfor -%}
|
| 35 |
+
{{ eos_token -}}
|
| 36 |
{%- elif message["role"] == "system" -%}
|
| 37 |
{%- for content in message["content"] -%}
|
| 38 |
{%- if content["type"] == "text" -%}
|