Instructions to use lmajnaric/paligemma-architecture-styles with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lmajnaric/paligemma-architecture-styles with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="lmajnaric/paligemma-architecture-styles")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("lmajnaric/paligemma-architecture-styles") model = AutoModelForMultimodalLM.from_pretrained("lmajnaric/paligemma-architecture-styles", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lmajnaric/paligemma-architecture-styles with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lmajnaric/paligemma-architecture-styles" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmajnaric/paligemma-architecture-styles", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lmajnaric/paligemma-architecture-styles
- SGLang
How to use lmajnaric/paligemma-architecture-styles 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 "lmajnaric/paligemma-architecture-styles" \ --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": "lmajnaric/paligemma-architecture-styles", "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 "lmajnaric/paligemma-architecture-styles" \ --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": "lmajnaric/paligemma-architecture-styles", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lmajnaric/paligemma-architecture-styles with Docker Model Runner:
docker model run hf.co/lmajnaric/paligemma-architecture-styles
paligemma-architecture-styles
This model is a fine-tuned version of google/paligemma2-3b-pt-448 on the None dataset.
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: 1e-05
- train_batch_size: 1
- eval_batch_size: 1
- seed: 42
- gradient_accumulation_steps: 8
- total_train_batch_size: 8
- optimizer: Use OptimizerNames.ADAMW_HF with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 20
- num_epochs: 3
Training results
TrainOutput(global_step=261, training_loss=1.761135561912681, metrics={'train_runtime': 1063.4627, 'train_samples_per_second': 1.975, 'train_steps_per_second': 0.245, 'total_flos': 3.156513684279552e+16, 'train_loss': 1.761135561912681, 'epoch': 2.9714285714285715})
Evals on base vs fine-tune
Base model:
Evaluation complete - Accuracy: 0.2400 (240/1000)
Performance by style: Ancient Egyptian architecture: 0.09 (5/57) Art Deco architecture: 0.23 (17/75) Art Nouveau architecture: 0.01 (1/73) Baroque architecture: 0.26 (15/58) Bauhaus architecture: 0.00 (0/58) Brutalism: 0.00 (0/38) Byzantine architecture: 0.34 (17/50) Chicago school architecture: 0.06 (3/51) Colonial architecture: 0.30 (27/89) Deconstructivism: 0.00 (0/38) Gothic architecture: 0.98 (59/60) Greek Revival architecture: 0.45 (26/58) International style: 0.00 (0/66) Neoclassicism: 0.14 (18/125) Postmodern architecture: 0.94 (47/50) Romanesque architecture: 0.09 (5/54) Base model results saved to paligemma448_arch_finetune_styles/base_model_folder_eval_20250316_183525.csv
=== EVALUATION RESULTS COMPARISON === Fine-tuned model accuracy: 0.8440 Base model accuracy: 0.2400 Improvement: 0.6040
The checkpoint-176 performs better than the latest checkpoint by .02, even though the training loss is lower on the latest checkpoint.
Framework versions
- Transformers 4.50.0.dev0
- Pytorch 2.6.0+cu124
- Datasets 3.4.0
- Tokenizers 0.21.0
- Downloads last month
- 8
Model tree for lmajnaric/paligemma-architecture-styles
Base model
google/paligemma2-3b-pt-448