Instructions to use MoonstoneF/kosm-checkpoint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MoonstoneF/kosm-checkpoint with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="MoonstoneF/kosm-checkpoint")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("MoonstoneF/kosm-checkpoint") model = AutoModelForMultimodalLM.from_pretrained("MoonstoneF/kosm-checkpoint", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MoonstoneF/kosm-checkpoint with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MoonstoneF/kosm-checkpoint" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MoonstoneF/kosm-checkpoint", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MoonstoneF/kosm-checkpoint
- SGLang
How to use MoonstoneF/kosm-checkpoint 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 "MoonstoneF/kosm-checkpoint" \ --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": "MoonstoneF/kosm-checkpoint", "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 "MoonstoneF/kosm-checkpoint" \ --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": "MoonstoneF/kosm-checkpoint", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MoonstoneF/kosm-checkpoint with Docker Model Runner:
docker model run hf.co/MoonstoneF/kosm-checkpoint
Updated text prompt to Q-A
Browse files- README.md +7 -8
- model-00001-of-00002.safetensors +1 -1
- model-00002-of-00002.safetensors +1 -1
README.md
CHANGED
|
@@ -15,7 +15,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [microsoft/kosmos-2-patch14-224](https://huggingface.co/microsoft/kosmos-2-patch14-224) on the None dataset.
|
| 17 |
It achieves the following results on the evaluation set:
|
| 18 |
-
- Loss: 0.
|
| 19 |
|
| 20 |
## Model description
|
| 21 |
|
|
@@ -43,18 +43,17 @@ The following hyperparameters were used during training:
|
|
| 43 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 44 |
- lr_scheduler_type: linear
|
| 45 |
- lr_scheduler_warmup_ratio: 0.1
|
| 46 |
-
- training_steps:
|
| 47 |
|
| 48 |
### Training results
|
| 49 |
|
| 50 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 51 |
|:-------------:|:------:|:----:|:---------------:|
|
| 52 |
-
| No log | 0.0497 | 200 | 0.
|
| 53 |
-
| 1.
|
| 54 |
-
| 0.
|
| 55 |
-
| 0.
|
| 56 |
-
| 0.
|
| 57 |
-
| 0.0626 | 0.2979 | 1200 | 0.0458 |
|
| 58 |
|
| 59 |
|
| 60 |
### Framework versions
|
|
|
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [microsoft/kosmos-2-patch14-224](https://huggingface.co/microsoft/kosmos-2-patch14-224) on the None dataset.
|
| 17 |
It achieves the following results on the evaluation set:
|
| 18 |
+
- Loss: 0.0501
|
| 19 |
|
| 20 |
## Model description
|
| 21 |
|
|
|
|
| 43 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 44 |
- lr_scheduler_type: linear
|
| 45 |
- lr_scheduler_warmup_ratio: 0.1
|
| 46 |
+
- training_steps: 1000
|
| 47 |
|
| 48 |
### Training results
|
| 49 |
|
| 50 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 51 |
|:-------------:|:------:|:----:|:---------------:|
|
| 52 |
+
| No log | 0.0497 | 200 | 0.1044 |
|
| 53 |
+
| 1.0039 | 0.0993 | 400 | 0.0760 |
|
| 54 |
+
| 0.0801 | 0.1490 | 600 | 0.0624 |
|
| 55 |
+
| 0.0728 | 0.1986 | 800 | 0.0538 |
|
| 56 |
+
| 0.0637 | 0.2483 | 1000 | 0.0501 |
|
|
|
|
| 57 |
|
| 58 |
|
| 59 |
### Framework versions
|
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999738624
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a680370aa4eec4d4001e6728f8c9235a49bc9c73aeb28c915ad062eef88c1b24
|
| 3 |
size 4999738624
|
model-00002-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1658313704
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e39d2f9b6d736af3a1260814896aab55b775b0ec1d5acfb70f3a31eaba29bc4
|
| 3 |
size 1658313704
|