Image-Text-to-Text
Transformers
Safetensors
qwen2_5_vl
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use OfficerChul/InfiGUI-G1-3B-Android-Control-5a with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OfficerChul/InfiGUI-G1-3B-Android-Control-5a with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OfficerChul/InfiGUI-G1-3B-Android-Control-5a") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("OfficerChul/InfiGUI-G1-3B-Android-Control-5a") model = AutoModelForImageTextToText.from_pretrained("OfficerChul/InfiGUI-G1-3B-Android-Control-5a") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OfficerChul/InfiGUI-G1-3B-Android-Control-5a with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OfficerChul/InfiGUI-G1-3B-Android-Control-5a" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OfficerChul/InfiGUI-G1-3B-Android-Control-5a", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/OfficerChul/InfiGUI-G1-3B-Android-Control-5a
- SGLang
How to use OfficerChul/InfiGUI-G1-3B-Android-Control-5a 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 "OfficerChul/InfiGUI-G1-3B-Android-Control-5a" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OfficerChul/InfiGUI-G1-3B-Android-Control-5a", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "OfficerChul/InfiGUI-G1-3B-Android-Control-5a" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OfficerChul/InfiGUI-G1-3B-Android-Control-5a", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use OfficerChul/InfiGUI-G1-3B-Android-Control-5a with Docker Model Runner:
docker model run hf.co/OfficerChul/InfiGUI-G1-3B-Android-Control-5a
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 5.0, | |
| "eval_steps": 100, | |
| "global_step": 450, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.11196641007697691, | |
| "grad_norm": 21.06309415699912, | |
| "learning_rate": 4.000000000000001e-06, | |
| "loss": 2.8571, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.22393282015395383, | |
| "grad_norm": 1.9727286004327564, | |
| "learning_rate": 8.444444444444446e-06, | |
| "loss": 0.6148, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.3358992302309307, | |
| "grad_norm": 2.2884377083477645, | |
| "learning_rate": 1.288888888888889e-05, | |
| "loss": 0.3928, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.44786564030790765, | |
| "grad_norm": 1.647085854397205, | |
| "learning_rate": 1.7333333333333336e-05, | |
| "loss": 0.3458, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.5598320503848845, | |
| "grad_norm": 2.329816835595036, | |
| "learning_rate": 1.9995186678809513e-05, | |
| "loss": 0.3267, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.6717984604618614, | |
| "grad_norm": 1.519218251845277, | |
| "learning_rate": 1.9941090015469614e-05, | |
| "loss": 0.3158, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.7837648705388384, | |
| "grad_norm": 1.3244908123467292, | |
| "learning_rate": 1.9827206467064133e-05, | |
| "loss": 0.3016, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.8957312806158153, | |
| "grad_norm": 1.0638147560775397, | |
| "learning_rate": 1.9654220942653223e-05, | |
| "loss": 0.278, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "grad_norm": 1.3750398954831957, | |
| "learning_rate": 1.9423173797534924e-05, | |
| "loss": 0.2639, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 1.1119664100769768, | |
| "grad_norm": 1.4059952043975563, | |
| "learning_rate": 1.913545457642601e-05, | |
| "loss": 0.2532, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 1.1119664100769768, | |
| "eval_loss": 0.2309780865907669, | |
| "eval_runtime": 334.81, | |
| "eval_samples_per_second": 10.785, | |
| "eval_steps_per_second": 2.697, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 1.2239328201539539, | |
| "grad_norm": 0.7770380776412505, | |
| "learning_rate": 1.8792793656576544e-05, | |
| "loss": 0.2366, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 1.3358992302309307, | |
| "grad_norm": 1.053613780680287, | |
| "learning_rate": 1.83972518410775e-05, | |
| "loss": 0.2316, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 1.4478656403079078, | |
| "grad_norm": 0.8850308205683671, | |
| "learning_rate": 1.795120796494848e-05, | |
| "loss": 0.2216, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 1.5598320503848844, | |
| "grad_norm": 1.080177617549634, | |
| "learning_rate": 1.7457344588544018e-05, | |
| "loss": 0.2155, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 1.6717984604618614, | |
| "grad_norm": 0.8218548086924884, | |
| "learning_rate": 1.691863186431996e-05, | |
| "loss": 0.2122, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 1.7837648705388385, | |
| "grad_norm": 0.6988372786589893, | |
| "learning_rate": 1.63383096739871e-05, | |
| "loss": 0.2059, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 1.8957312806158153, | |
| "grad_norm": 0.7684849910572107, | |
| "learning_rate": 1.5719868143481385e-05, | |
| "loss": 0.2034, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "grad_norm": 1.2808833317754085, | |
| "learning_rate": 1.5067026652935823e-05, | |
| "loss": 0.1995, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 2.111966410076977, | |
| "grad_norm": 0.9108986394736251, | |
| "learning_rate": 1.4383711467890776e-05, | |
| "loss": 0.1764, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 2.2239328201539537, | |
| "grad_norm": 1.0633553433425496, | |
| "learning_rate": 1.3674032126270982e-05, | |
| "loss": 0.1713, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 2.2239328201539537, | |
| "eval_loss": 0.18000730872154236, | |
| "eval_runtime": 337.0653, | |
| "eval_samples_per_second": 10.713, | |
| "eval_steps_per_second": 2.679, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 2.3358992302309307, | |
| "grad_norm": 0.8859214091666336, | |
| "learning_rate": 1.2942256723140951e-05, | |
| "loss": 0.1671, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 2.4478656403079078, | |
| "grad_norm": 0.849493216288489, | |
| "learning_rate": 1.2192786241879033e-05, | |
| "loss": 0.1703, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 2.5598320503848844, | |
| "grad_norm": 1.0004480128274726, | |
| "learning_rate": 1.1430128086145542e-05, | |
| "loss": 0.1642, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 2.6717984604618614, | |
| "grad_norm": 0.9096432098561809, | |
| "learning_rate": 1.0658868971826785e-05, | |
| "loss": 0.1553, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 2.7837648705388385, | |
| "grad_norm": 0.7475626808919502, | |
| "learning_rate": 9.883647341986032e-06, | |
| "loss": 0.1616, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 2.8957312806158155, | |
| "grad_norm": 0.7289602464956204, | |
| "learning_rate": 9.109125470721141e-06, | |
| "loss": 0.157, | |
| "step": 260 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "grad_norm": 0.9343429127547538, | |
| "learning_rate": 8.339961423699563e-06, | |
| "loss": 0.1528, | |
| "step": 270 | |
| }, | |
| { | |
| "epoch": 3.111966410076977, | |
| "grad_norm": 0.8272491815261758, | |
| "learning_rate": 7.580781044003324e-06, | |
| "loss": 0.1249, | |
| "step": 280 | |
| }, | |
| { | |
| "epoch": 3.2239328201539537, | |
| "grad_norm": 0.8785316150577709, | |
| "learning_rate": 6.836150131764434e-06, | |
| "loss": 0.1168, | |
| "step": 290 | |
| }, | |
| { | |
| "epoch": 3.3358992302309307, | |
| "grad_norm": 0.8757974207894819, | |
| "learning_rate": 6.110546984905661e-06, | |
| "loss": 0.1178, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 3.3358992302309307, | |
| "eval_loss": 0.15590140223503113, | |
| "eval_runtime": 335.9835, | |
| "eval_samples_per_second": 10.748, | |
| "eval_steps_per_second": 2.688, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 3.4478656403079078, | |
| "grad_norm": 0.8970654870881085, | |
| "learning_rate": 5.4083354661298816e-06, | |
| "loss": 0.1208, | |
| "step": 310 | |
| }, | |
| { | |
| "epoch": 3.5598320503848844, | |
| "grad_norm": 0.7754639069886827, | |
| "learning_rate": 4.733738758136327e-06, | |
| "loss": 0.1144, | |
| "step": 320 | |
| }, | |
| { | |
| "epoch": 3.6717984604618614, | |
| "grad_norm": 1.892274710129508, | |
| "learning_rate": 4.090813964902889e-06, | |
| "loss": 0.1156, | |
| "step": 330 | |
| }, | |
| { | |
| "epoch": 3.7837648705388385, | |
| "grad_norm": 1.2589854864442425, | |
| "learning_rate": 3.483427711785449e-06, | |
| "loss": 0.1132, | |
| "step": 340 | |
| }, | |
| { | |
| "epoch": 3.8957312806158155, | |
| "grad_norm": 0.8837972275737342, | |
| "learning_rate": 2.9152328911780027e-06, | |
| "loss": 0.1116, | |
| "step": 350 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "grad_norm": 2.2328227938809153, | |
| "learning_rate": 2.3896466935879957e-06, | |
| "loss": 0.1115, | |
| "step": 360 | |
| }, | |
| { | |
| "epoch": 4.111966410076977, | |
| "grad_norm": 0.9921573733470108, | |
| "learning_rate": 1.9098300562505266e-06, | |
| "loss": 0.0792, | |
| "step": 370 | |
| }, | |
| { | |
| "epoch": 4.223932820153954, | |
| "grad_norm": 2.590495365853637, | |
| "learning_rate": 1.4786686528798878e-06, | |
| "loss": 0.0739, | |
| "step": 380 | |
| }, | |
| { | |
| "epoch": 4.335899230230931, | |
| "grad_norm": 1.172303338637939, | |
| "learning_rate": 1.0987555388883042e-06, | |
| "loss": 0.0777, | |
| "step": 390 | |
| }, | |
| { | |
| "epoch": 4.447865640307907, | |
| "grad_norm": 0.9032745376031973, | |
| "learning_rate": 7.723755564455771e-07, | |
| "loss": 0.0765, | |
| "step": 400 | |
| }, | |
| { | |
| "epoch": 4.447865640307907, | |
| "eval_loss": 0.16239598393440247, | |
| "eval_runtime": 335.8645, | |
| "eval_samples_per_second": 10.751, | |
| "eval_steps_per_second": 2.689, | |
| "step": 400 | |
| }, | |
| { | |
| "epoch": 4.559832050384885, | |
| "grad_norm": 1.200437444817232, | |
| "learning_rate": 5.014915931694253e-07, | |
| "loss": 0.0784, | |
| "step": 410 | |
| }, | |
| { | |
| "epoch": 4.671798460461861, | |
| "grad_norm": 2.214432160562882, | |
| "learning_rate": 2.877327770883964e-07, | |
| "loss": 0.0774, | |
| "step": 420 | |
| }, | |
| { | |
| "epoch": 4.783764870538838, | |
| "grad_norm": 0.7916736334089312, | |
| "learning_rate": 1.323846788742078e-07, | |
| "loss": 0.0736, | |
| "step": 430 | |
| }, | |
| { | |
| "epoch": 4.8957312806158155, | |
| "grad_norm": 0.8181788452191515, | |
| "learning_rate": 3.6381580268463056e-08, | |
| "loss": 0.0748, | |
| "step": 440 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "grad_norm": 8.445524032141444, | |
| "learning_rate": 3.008552023242572e-10, | |
| "loss": 0.0727, | |
| "step": 450 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "step": 450, | |
| "total_flos": 1141497040732160.0, | |
| "train_loss": 0.24183495627509224, | |
| "train_runtime": 30070.9864, | |
| "train_samples_per_second": 11.405, | |
| "train_steps_per_second": 0.015 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 450, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 5, | |
| "save_steps": 100, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 1141497040732160.0, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |