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 filesFiles changed (3)
14 unmodified lines1516171819202121 unmodified lines43444546474849505152535455565758596014 unmodified linesThis model is a fine-tuned version of [microsoft/kosmos-2-patch14-224](https://huggingface.co/microsoft/kosmos-2-patch14-224) on the None dataset.It achieves the following results on the evaluation set:- Loss: 0.0458## Model description21 unmodified lines- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: linear- lr_scheduler_warmup_ratio: 0.1- training_steps: 1200### Training results| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:------:|:----:|:---------------:|| No log | 0.0497 | 200 | 0.1075 || 1.077 | 0.0993 | 400 | 0.0816 || 0.0909 | 0.1490 | 600 | 0.0634 || 0.0731 | 0.1986 | 800 | 0.0531 || 0.0626 | 0.2483 | 1000 | 0.0482 || 0.0626 | 0.2979 | 1200 | 0.0458 |### Framework versions14 unmodified lines1516171819202121 unmodified lines434445464748495051525354555657585914 unmodified linesThis model is a fine-tuned version of [microsoft/kosmos-2-patch14-224](https://huggingface.co/microsoft/kosmos-2-patch14-224) on the None dataset.It achieves the following results on the evaluation set:- Loss: 0.0501## Model description21 unmodified lines- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: linear- lr_scheduler_warmup_ratio: 0.1- training_steps: 1000### Training results| Training Loss | Epoch | Step | Validation Loss ||:-------------:|:------:|:----:|:---------------:|| No log | 0.0497 | 200 | 0.1044 || 1.0039 | 0.0993 | 400 | 0.0760 || 0.0801 | 0.1490 | 600 | 0.0624 || 0.0728 | 0.1986 | 800 | 0.0538 || 0.0637 | 0.2483 | 1000 | 0.0501 |### Framework versions
123version https://git-lfs.github.com/spec/v1oid sha256:c008b367d97d64d45bc7f97ffc1a6376a7d9b4933c12fd33e34fbf9387004925size 4999738624123version https://git-lfs.github.com/spec/v1oid sha256:a680370aa4eec4d4001e6728f8c9235a49bc9c73aeb28c915ad062eef88c1b24size 4999738624
123version https://git-lfs.github.com/spec/v1oid sha256:bd2f1b1b7c7cc4cd69cbabab6a1944e764e4ebfba704b32ec3d5246e610d5b28size 1658313704123version https://git-lfs.github.com/spec/v1oid sha256:8e39d2f9b6d736af3a1260814896aab55b775b0ec1d5acfb70f3a31eaba29bc4size 1658313704
README.md+7-8
model-00001-of-00002.safetensors+1-1
model-00002-of-00002.safetensors+1-1