Instructions to use deepakshirkem/image-description_to_emotion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepakshirkem/image-description_to_emotion with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deepakshirkem/image-description_to_emotion")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("deepakshirkem/image-description_to_emotion") model = AutoModelForCausalLM.from_pretrained("deepakshirkem/image-description_to_emotion") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use deepakshirkem/image-description_to_emotion with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deepakshirkem/image-description_to_emotion" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepakshirkem/image-description_to_emotion", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/deepakshirkem/image-description_to_emotion
- SGLang
How to use deepakshirkem/image-description_to_emotion 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 "deepakshirkem/image-description_to_emotion" \ --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": "deepakshirkem/image-description_to_emotion", "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 "deepakshirkem/image-description_to_emotion" \ --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": "deepakshirkem/image-description_to_emotion", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use deepakshirkem/image-description_to_emotion with Docker Model Runner:
docker model run hf.co/deepakshirkem/image-description_to_emotion
image-description_to_emotion
This model is a fine-tuned version of HuggingFaceTB/SmolLM2-360M on the arrow dataset. It achieves the following results on the evaluation set:
- Loss: 0.1650
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: 2e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 4
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 0.5979 | 0.3361 | 50 | 0.5039 |
| 0.3262 | 0.6723 | 100 | 0.2783 |
| 0.2599 | 1.0084 | 150 | 0.2305 |
| 0.2211 | 1.3445 | 200 | 0.2071 |
| 0.2004 | 1.6807 | 250 | 0.1969 |
| 0.2094 | 2.0168 | 300 | 0.1840 |
| 0.1788 | 2.3529 | 350 | 0.1797 |
| 0.1709 | 2.6891 | 400 | 0.1739 |
| 0.1604 | 3.0252 | 450 | 0.1693 |
| 0.141 | 3.3613 | 500 | 0.1671 |
| 0.1479 | 3.6975 | 550 | 0.1650 |
Framework versions
- Transformers 4.44.2
- Pytorch 2.4.1+cu121
- Datasets 3.2.0
- Tokenizers 0.19.1
- Downloads last month
- 2