Image-Text-to-Text
Transformers
TensorBoard
Safetensors
vision-encoder-decoder
Generated from Trainer
Instructions to use Sans1807/APNR-Braincore-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sans1807/APNR-Braincore-V1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Sans1807/APNR-Braincore-V1")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Sans1807/APNR-Braincore-V1") model = AutoModelForMultimodalLM.from_pretrained("Sans1807/APNR-Braincore-V1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Sans1807/APNR-Braincore-V1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sans1807/APNR-Braincore-V1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sans1807/APNR-Braincore-V1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Sans1807/APNR-Braincore-V1
- SGLang
How to use Sans1807/APNR-Braincore-V1 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 "Sans1807/APNR-Braincore-V1" \ --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": "Sans1807/APNR-Braincore-V1", "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 "Sans1807/APNR-Braincore-V1" \ --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": "Sans1807/APNR-Braincore-V1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Sans1807/APNR-Braincore-V1 with Docker Model Runner:
docker model run hf.co/Sans1807/APNR-Braincore-V1
| library_name: transformers | |
| base_model: microsoft/trocr-base-str | |
| tags: | |
| - generated_from_trainer | |
| metrics: | |
| - wer | |
| model-index: | |
| - name: microsoft/trocr-base-str | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| # microsoft/trocr-base-str | |
| This model is a fine-tuned version of [microsoft/trocr-base-str](https://huggingface.co/microsoft/trocr-base-str) on an unknown dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.1131 | |
| - Cer: 0.0102 | |
| - Wer: 0.0601 | |
| ## Model description | |
| More information needed | |
| ## Intended uses & limitations | |
| More information needed | |
| ## Training and evaluation data | |
| More information needed | |
| ## Training procedure | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 1e-05 | |
| - train_batch_size: 16 | |
| - eval_batch_size: 16 | |
| - seed: 42 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: linear | |
| - num_epochs: 25 | |
| - mixed_precision_training: Native AMP | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | Cer | Wer | | |
| |:-------------:|:-----:|:----:|:---------------:|:------:|:------:| | |
| | 1.8737 | 1.0 | 173 | 0.5194 | 0.0668 | 0.2809 | | |
| | 0.3674 | 2.0 | 346 | 0.1408 | 0.0183 | 0.1015 | | |
| | 0.0907 | 3.0 | 519 | 0.1151 | 0.0150 | 0.0821 | | |
| | 0.0584 | 4.0 | 692 | 0.0987 | 0.0140 | 0.0778 | | |
| | 0.0374 | 5.0 | 865 | 0.1041 | 0.0113 | 0.0711 | | |
| | 0.0237 | 6.0 | 1038 | 0.0988 | 0.0102 | 0.0626 | | |
| | 0.0172 | 7.0 | 1211 | 0.0981 | 0.0109 | 0.0643 | | |
| | 0.0177 | 8.0 | 1384 | 0.1019 | 0.0109 | 0.0643 | | |
| | 0.0134 | 9.0 | 1557 | 0.1080 | 0.0106 | 0.0643 | | |
| | 0.009 | 10.0 | 1730 | 0.1023 | 0.0094 | 0.0567 | | |
| | 0.0092 | 11.0 | 1903 | 0.1021 | 0.0090 | 0.0558 | | |
| | 0.0085 | 12.0 | 2076 | 0.1057 | 0.0105 | 0.0635 | | |
| | 0.006 | 13.0 | 2249 | 0.1055 | 0.0107 | 0.0618 | | |
| | 0.006 | 14.0 | 2422 | 0.1066 | 0.0105 | 0.0618 | | |
| | 0.0046 | 15.0 | 2595 | 0.1110 | 0.0103 | 0.0618 | | |
| | 0.0038 | 16.0 | 2768 | 0.1093 | 0.0101 | 0.0601 | | |
| | 0.0028 | 17.0 | 2941 | 0.1095 | 0.0099 | 0.0575 | | |
| | 0.0026 | 18.0 | 3114 | 0.1095 | 0.0099 | 0.0575 | | |
| | 0.0021 | 19.0 | 3287 | 0.1088 | 0.0097 | 0.0584 | | |
| | 0.0017 | 20.0 | 3460 | 0.1127 | 0.0105 | 0.0601 | | |
| | 0.0014 | 21.0 | 3633 | 0.1127 | 0.0099 | 0.0575 | | |
| | 0.0015 | 22.0 | 3806 | 0.1129 | 0.0101 | 0.0592 | | |
| | 0.0008 | 23.0 | 3979 | 0.1132 | 0.0101 | 0.0592 | | |
| | 0.0008 | 24.0 | 4152 | 0.1132 | 0.0102 | 0.0601 | | |
| | 0.0006 | 25.0 | 4325 | 0.1131 | 0.0102 | 0.0601 | | |
| ### Framework versions | |
| - Transformers 4.44.2 | |
| - Pytorch 2.4.1+cu121 | |
| - Datasets 2.17.0 | |
| - Tokenizers 0.19.1 | |