Image-to-Text
Transformers
Safetensors
dots_ocr
text-generation
ocr
document-parse
layout
table
formula
quantized
4-bit precision
custom_code
bitsandbytes
Instructions to use helizac/dots.ocr-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use helizac/dots.ocr-4bit with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="helizac/dots.ocr-4bit", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("helizac/dots.ocr-4bit", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_dots_vision.py
Browse files- modeling_dots_vision.py +1 -1
modeling_dots_vision.py
CHANGED
|
@@ -7,7 +7,7 @@ import torch.utils.checkpoint
|
|
| 7 |
from flash_attn import flash_attn_varlen_func
|
| 8 |
from torch.nn import LayerNorm
|
| 9 |
from transformers.modeling_utils import PreTrainedModel
|
| 10 |
-
from configuration_dots import DotsVisionConfig
|
| 11 |
|
| 12 |
|
| 13 |
def rotate_half(x):
|
|
|
|
| 7 |
from flash_attn import flash_attn_varlen_func
|
| 8 |
from torch.nn import LayerNorm
|
| 9 |
from transformers.modeling_utils import PreTrainedModel
|
| 10 |
+
from .configuration_dots import DotsVisionConfig
|
| 11 |
|
| 12 |
|
| 13 |
def rotate_half(x):
|