staghado/LightOnOCR-2-1B-1025-ft-iam
Browse files- .gitattributes +1 -0
- README.md +60 -0
- adapter_config.json +43 -0
- adapter_model.safetensors +3 -0
- chat_template.jinja +26 -0
- processor_config.json +30 -0
- tokenizer.json +3 -0
- tokenizer_config.json +38 -0
- training_args.bin +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
base_model: lightonai/LightOnOCR-2-1B-base
|
| 5 |
+
tags:
|
| 6 |
+
- base_model:adapter:lightonai/LightOnOCR-2-1B-base
|
| 7 |
+
- lora
|
| 8 |
+
- transformers
|
| 9 |
+
pipeline_tag: text-generation
|
| 10 |
+
model-index:
|
| 11 |
+
- name: LightOnOCR-2-ft-model
|
| 12 |
+
results: []
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 16 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 17 |
+
|
| 18 |
+
# LightOnOCR-2-ft-model
|
| 19 |
+
|
| 20 |
+
This model is a fine-tuned version of [lightonai/LightOnOCR-2-1B-base](https://huggingface.co/lightonai/LightOnOCR-2-1B-base) on an unknown dataset.
|
| 21 |
+
|
| 22 |
+
## Model description
|
| 23 |
+
|
| 24 |
+
More information needed
|
| 25 |
+
|
| 26 |
+
## Intended uses & limitations
|
| 27 |
+
|
| 28 |
+
More information needed
|
| 29 |
+
|
| 30 |
+
## Training and evaluation data
|
| 31 |
+
|
| 32 |
+
More information needed
|
| 33 |
+
|
| 34 |
+
## Training procedure
|
| 35 |
+
|
| 36 |
+
### Training hyperparameters
|
| 37 |
+
|
| 38 |
+
The following hyperparameters were used during training:
|
| 39 |
+
- learning_rate: 6e-05
|
| 40 |
+
- train_batch_size: 2
|
| 41 |
+
- eval_batch_size: 8
|
| 42 |
+
- seed: 42
|
| 43 |
+
- gradient_accumulation_steps: 8
|
| 44 |
+
- total_train_batch_size: 16
|
| 45 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 46 |
+
- lr_scheduler_type: linear
|
| 47 |
+
- lr_scheduler_warmup_steps: 10
|
| 48 |
+
- num_epochs: 1
|
| 49 |
+
|
| 50 |
+
### Training results
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
### Framework versions
|
| 55 |
+
|
| 56 |
+
- PEFT 0.18.1
|
| 57 |
+
- Transformers 5.0.0
|
| 58 |
+
- Pytorch 2.9.0+cu126
|
| 59 |
+
- Datasets 4.5.0
|
| 60 |
+
- Tokenizers 0.22.2
|
adapter_config.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "lightonai/LightOnOCR-2-1B-base",
|
| 7 |
+
"bias": "none",
|
| 8 |
+
"corda_config": null,
|
| 9 |
+
"ensure_weight_tying": false,
|
| 10 |
+
"eva_config": null,
|
| 11 |
+
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
+
"inference_mode": true,
|
| 14 |
+
"init_lora_weights": true,
|
| 15 |
+
"layer_replication": null,
|
| 16 |
+
"layers_pattern": null,
|
| 17 |
+
"layers_to_transform": null,
|
| 18 |
+
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 64,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.05,
|
| 22 |
+
"megatron_config": null,
|
| 23 |
+
"megatron_core": "megatron.core",
|
| 24 |
+
"modules_to_save": null,
|
| 25 |
+
"peft_type": "LORA",
|
| 26 |
+
"peft_version": "0.18.1",
|
| 27 |
+
"qalora_group_size": 16,
|
| 28 |
+
"r": 8,
|
| 29 |
+
"rank_pattern": {},
|
| 30 |
+
"revision": null,
|
| 31 |
+
"target_modules": [
|
| 32 |
+
"gate_proj",
|
| 33 |
+
"o_proj",
|
| 34 |
+
"up_proj",
|
| 35 |
+
"down_proj"
|
| 36 |
+
],
|
| 37 |
+
"target_parameters": null,
|
| 38 |
+
"task_type": "CAUSAL_LM",
|
| 39 |
+
"trainable_token_indices": null,
|
| 40 |
+
"use_dora": false,
|
| 41 |
+
"use_qalora": false,
|
| 42 |
+
"use_rslora": false
|
| 43 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6bbf3f28077ab7c99a0be20f69b13d4da6ffc6934624122d9148b8e0d9e4b36
|
| 3 |
+
size 27195864
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% set image_count = namespace(value=0) %}
|
| 2 |
+
{% for message in messages %}
|
| 3 |
+
{% if loop.first and message['role'] != 'system' %}
|
| 4 |
+
<|im_start|>system<|im_end|>
|
| 5 |
+
{% endif %}
|
| 6 |
+
<|im_start|>{{ message['role'] }}
|
| 7 |
+
{% if message['content'] is string %}
|
| 8 |
+
{{ message['content'] }}<|im_end|>
|
| 9 |
+
{% else %}
|
| 10 |
+
{% for content in message['content'] %}
|
| 11 |
+
{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}
|
| 12 |
+
{% set image_count.value = image_count.value + 1 %}
|
| 13 |
+
{% if add_vision_id %}
|
| 14 |
+
Picture {{ image_count.value }}:
|
| 15 |
+
{% endif -%}
|
| 16 |
+
<|image_pad|>
|
| 17 |
+
{%- elif 'text' in content %}
|
| 18 |
+
{{ content['text'] }}
|
| 19 |
+
{% endif %}
|
| 20 |
+
{% endfor %}
|
| 21 |
+
<|im_end|>
|
| 22 |
+
{% endif %}
|
| 23 |
+
{% endfor %}
|
| 24 |
+
{% if add_generation_prompt %}
|
| 25 |
+
<|im_start|>assistant
|
| 26 |
+
{% endif %}
|
processor_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"data_format": "channels_first",
|
| 4 |
+
"default_to_square": true,
|
| 5 |
+
"do_convert_rgb": true,
|
| 6 |
+
"do_normalize": true,
|
| 7 |
+
"do_rescale": true,
|
| 8 |
+
"do_resize": true,
|
| 9 |
+
"image_mean": [
|
| 10 |
+
0.48145466,
|
| 11 |
+
0.4578275,
|
| 12 |
+
0.40821073
|
| 13 |
+
],
|
| 14 |
+
"image_processor_type": "PixtralImageProcessorFast",
|
| 15 |
+
"image_std": [
|
| 16 |
+
0.26862954,
|
| 17 |
+
0.26130258,
|
| 18 |
+
0.27577711
|
| 19 |
+
],
|
| 20 |
+
"patch_size": 14,
|
| 21 |
+
"resample": 3,
|
| 22 |
+
"rescale_factor": 0.00392156862745098,
|
| 23 |
+
"size": {
|
| 24 |
+
"longest_edge": 1540
|
| 25 |
+
}
|
| 26 |
+
},
|
| 27 |
+
"patch_size": 14,
|
| 28 |
+
"processor_class": "LightOnOcrProcessor",
|
| 29 |
+
"spatial_merge_size": 2
|
| 30 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76e580b3d8813bf32482aa4e67c2d63be564d792244c8768e850df3cc7000470
|
| 3 |
+
size 11422920
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": null,
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|im_end|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|im_start|>",
|
| 10 |
+
"<|im_end|>",
|
| 11 |
+
"<|object_ref_start|>",
|
| 12 |
+
"<|object_ref_end|>",
|
| 13 |
+
"<|box_start|>",
|
| 14 |
+
"<|box_end|>",
|
| 15 |
+
"<|quad_start|>",
|
| 16 |
+
"<|quad_end|>",
|
| 17 |
+
"<|vision_start|>",
|
| 18 |
+
"<|vision_end|>",
|
| 19 |
+
"<|vision_pad|>",
|
| 20 |
+
"<|image_pad|>",
|
| 21 |
+
"<|video_pad|>"
|
| 22 |
+
],
|
| 23 |
+
"image_break_token": "<|vision_pad|>",
|
| 24 |
+
"image_end_token": "<|vision_end|>",
|
| 25 |
+
"image_token": "<|image_pad|>",
|
| 26 |
+
"is_local": false,
|
| 27 |
+
"max_length": null,
|
| 28 |
+
"model_max_length": 131072,
|
| 29 |
+
"model_specific_special_tokens": {},
|
| 30 |
+
"pad_to_multiple_of": null,
|
| 31 |
+
"pad_token": "<|endoftext|>",
|
| 32 |
+
"pad_token_type_id": 0,
|
| 33 |
+
"padding_side": "left",
|
| 34 |
+
"processor_class": "LightOnOcrProcessor",
|
| 35 |
+
"split_special_tokens": false,
|
| 36 |
+
"tokenizer_class": "TokenizersBackend",
|
| 37 |
+
"unk_token": null
|
| 38 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:789f62527e50c53854e533fe749b0933f76c6733c48513c658302069df52981c
|
| 3 |
+
size 5137
|