Instructions to use srimanth-d/GOT_CPU with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use srimanth-d/GOT_CPU with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="srimanth-d/GOT_CPU", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("srimanth-d/GOT_CPU", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use srimanth-d/GOT_CPU with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "srimanth-d/GOT_CPU" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "srimanth-d/GOT_CPU", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/srimanth-d/GOT_CPU
- SGLang
How to use srimanth-d/GOT_CPU 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 "srimanth-d/GOT_CPU" \ --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": "srimanth-d/GOT_CPU", "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 "srimanth-d/GOT_CPU" \ --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": "srimanth-d/GOT_CPU", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use srimanth-d/GOT_CPU with Docker Model Runner:
docker model run hf.co/srimanth-d/GOT_CPU
MPS Support?
Do you think it would be possible to support MPS acceleration? (Apple Silicon)
Yes, I think it would be possible to do so. I am currently working on that. Please feel free to drop message in here, for any updates.
Do you think it would be possible to support MPS acceleration? (Apple Silicon)
I think I made the necessary changes to the code. Please let me know if you are able to run it on MPS.
@Youcef
If you are able to run this successfully on MPS, I will close this discussion.
mind giving me till friday, a bit busy with exams right now
I think I am not able to run this model on "mps". So I am sticking with "cpu". I mean, I am dropping the idea of getting this model running on "mps". It will still run perfectly fine on "cuda" and "cpu".
@srntokyo Please let me know how are you able to run it on mps?
If anyone if able to figure out how to run this model on "mps", please let me know.
