Instructions to use davanstrien/lightonocr-books-test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use davanstrien/lightonocr-books-test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="davanstrien/lightonocr-books-test") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("davanstrien/lightonocr-books-test", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use davanstrien/lightonocr-books-test with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "davanstrien/lightonocr-books-test" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "davanstrien/lightonocr-books-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/davanstrien/lightonocr-books-test
- SGLang
How to use davanstrien/lightonocr-books-test 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 "davanstrien/lightonocr-books-test" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "davanstrien/lightonocr-books-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "davanstrien/lightonocr-books-test" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "davanstrien/lightonocr-books-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use davanstrien/lightonocr-books-test with Docker Model Runner:
docker model run hf.co/davanstrien/lightonocr-books-test
Model save
Browse files- README.md +18 -18
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -16,7 +16,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 16 |
|
| 17 |
This model is a fine-tuned version of [lightonai/LightOnOCR-1B-1025](https://huggingface.co/lightonai/LightOnOCR-1B-1025) on an unknown dataset.
|
| 18 |
It achieves the following results on the evaluation set:
|
| 19 |
-
- Loss: 0.
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
@@ -50,27 +50,27 @@ The following hyperparameters were used during training:
|
|
| 50 |
|
| 51 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 52 |
|:-------------:|:------:|:----:|:---------------:|
|
| 53 |
-
| 0.
|
| 54 |
-
| 0.
|
| 55 |
-
| 0.
|
| 56 |
-
| 0.
|
| 57 |
-
| 0.
|
| 58 |
-
| 0.
|
| 59 |
-
| 0.
|
| 60 |
-
| 0.
|
| 61 |
-
| 0.
|
| 62 |
-
| 0.
|
| 63 |
-
| 0.
|
| 64 |
-
| 0.
|
| 65 |
-
| 0.
|
| 66 |
-
| 0.
|
| 67 |
-
| 0.
|
| 68 |
-
| 0.
|
| 69 |
|
| 70 |
|
| 71 |
### Framework versions
|
| 72 |
|
| 73 |
- Transformers 5.0.0.dev0
|
| 74 |
- Pytorch 2.9.0+cu128
|
| 75 |
-
- Datasets 4.
|
| 76 |
- Tokenizers 0.22.1
|
|
|
|
| 16 |
|
| 17 |
This model is a fine-tuned version of [lightonai/LightOnOCR-1B-1025](https://huggingface.co/lightonai/LightOnOCR-1B-1025) on an unknown dataset.
|
| 18 |
It achieves the following results on the evaluation set:
|
| 19 |
+
- Loss: 0.1898
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
|
|
| 50 |
|
| 51 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 52 |
|:-------------:|:------:|:----:|:---------------:|
|
| 53 |
+
| 0.9005 | 0.0619 | 50 | 0.2190 |
|
| 54 |
+
| 0.7568 | 0.1239 | 100 | 0.2133 |
|
| 55 |
+
| 0.7556 | 0.1858 | 150 | 0.2129 |
|
| 56 |
+
| 0.8055 | 0.2478 | 200 | 0.2108 |
|
| 57 |
+
| 0.7609 | 0.3097 | 250 | 0.2021 |
|
| 58 |
+
| 0.6656 | 0.3716 | 300 | 0.1993 |
|
| 59 |
+
| 0.7036 | 0.4336 | 350 | 0.1979 |
|
| 60 |
+
| 0.8552 | 0.4955 | 400 | 0.1929 |
|
| 61 |
+
| 0.8087 | 0.5574 | 450 | 0.1944 |
|
| 62 |
+
| 0.7815 | 0.6194 | 500 | 0.1913 |
|
| 63 |
+
| 0.6349 | 0.6813 | 550 | 0.1930 |
|
| 64 |
+
| 0.7542 | 0.7433 | 600 | 0.1901 |
|
| 65 |
+
| 0.6332 | 0.8052 | 650 | 0.1913 |
|
| 66 |
+
| 0.6949 | 0.8671 | 700 | 0.1904 |
|
| 67 |
+
| 0.7974 | 0.9291 | 750 | 0.1896 |
|
| 68 |
+
| 0.5963 | 0.9910 | 800 | 0.1898 |
|
| 69 |
|
| 70 |
|
| 71 |
### Framework versions
|
| 72 |
|
| 73 |
- Transformers 5.0.0.dev0
|
| 74 |
- Pytorch 2.9.0+cu128
|
| 75 |
+
- Datasets 4.4.0
|
| 76 |
- Tokenizers 0.22.1
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2322532728
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:13b469230d3d33c118f0c4fdd7ac6dbb8bf87c85e997eda5e2ea4b6f272ccd09
|
| 3 |
size 2322532728
|