Image-Text-to-Text
Transformers
Safetensors
gemma3
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use AsherYang/physics_pmf_4bg_joint_api-step111 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AsherYang/physics_pmf_4bg_joint_api-step111 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AsherYang/physics_pmf_4bg_joint_api-step111") 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("AsherYang/physics_pmf_4bg_joint_api-step111") model = AutoModelForImageTextToText.from_pretrained("AsherYang/physics_pmf_4bg_joint_api-step111") 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 AsherYang/physics_pmf_4bg_joint_api-step111 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AsherYang/physics_pmf_4bg_joint_api-step111" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AsherYang/physics_pmf_4bg_joint_api-step111", "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/AsherYang/physics_pmf_4bg_joint_api-step111
- SGLang
How to use AsherYang/physics_pmf_4bg_joint_api-step111 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 "AsherYang/physics_pmf_4bg_joint_api-step111" \ --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": "AsherYang/physics_pmf_4bg_joint_api-step111", "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 "AsherYang/physics_pmf_4bg_joint_api-step111" \ --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": "AsherYang/physics_pmf_4bg_joint_api-step111", "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 AsherYang/physics_pmf_4bg_joint_api-step111 with Docker Model Runner:
docker model run hf.co/AsherYang/physics_pmf_4bg_joint_api-step111
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 4.0, | |
| "eval_steps": 200, | |
| "global_step": 60, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.07079646017699115, | |
| "grad_norm": 50.074012756347656, | |
| "learning_rate": 0.0, | |
| "loss": 1.40986967086792, | |
| "step": 1 | |
| }, | |
| { | |
| "epoch": 0.1415929203539823, | |
| "grad_norm": 53.68495559692383, | |
| "learning_rate": 1.6666666666666667e-06, | |
| "loss": 1.4964791536331177, | |
| "step": 2 | |
| }, | |
| { | |
| "epoch": 0.21238938053097345, | |
| "grad_norm": 43.420005798339844, | |
| "learning_rate": 3.3333333333333333e-06, | |
| "loss": 1.3421201705932617, | |
| "step": 3 | |
| }, | |
| { | |
| "epoch": 0.2831858407079646, | |
| "grad_norm": 18.960111618041992, | |
| "learning_rate": 5e-06, | |
| "loss": 1.118983507156372, | |
| "step": 4 | |
| }, | |
| { | |
| "epoch": 0.35398230088495575, | |
| "grad_norm": 6.306451797485352, | |
| "learning_rate": 6.666666666666667e-06, | |
| "loss": 0.9437508583068848, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.4247787610619469, | |
| "grad_norm": 9.622514724731445, | |
| "learning_rate": 8.333333333333334e-06, | |
| "loss": 0.9040769338607788, | |
| "step": 6 | |
| }, | |
| { | |
| "epoch": 0.49557522123893805, | |
| "grad_norm": 6.888988971710205, | |
| "learning_rate": 1e-05, | |
| "loss": 0.8478146195411682, | |
| "step": 7 | |
| }, | |
| { | |
| "epoch": 0.5663716814159292, | |
| "grad_norm": 2.924564838409424, | |
| "learning_rate": 9.991540791356342e-06, | |
| "loss": 0.760687530040741, | |
| "step": 8 | |
| }, | |
| { | |
| "epoch": 0.6371681415929203, | |
| "grad_norm": 2.7066144943237305, | |
| "learning_rate": 9.966191788709716e-06, | |
| "loss": 0.8113027811050415, | |
| "step": 9 | |
| }, | |
| { | |
| "epoch": 0.7079646017699115, | |
| "grad_norm": 1.9081557989120483, | |
| "learning_rate": 9.924038765061042e-06, | |
| "loss": 0.7258458137512207, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.7787610619469026, | |
| "grad_norm": 1.6245616674423218, | |
| "learning_rate": 9.86522435289912e-06, | |
| "loss": 0.7298057079315186, | |
| "step": 11 | |
| }, | |
| { | |
| "epoch": 0.8495575221238938, | |
| "grad_norm": 1.6821726560592651, | |
| "learning_rate": 9.789947561577445e-06, | |
| "loss": 0.7588151693344116, | |
| "step": 12 | |
| }, | |
| { | |
| "epoch": 0.9203539823008849, | |
| "grad_norm": 1.4290574789047241, | |
| "learning_rate": 9.698463103929542e-06, | |
| "loss": 0.7416592836380005, | |
| "step": 13 | |
| }, | |
| { | |
| "epoch": 0.9911504424778761, | |
| "grad_norm": 1.4913954734802246, | |
| "learning_rate": 9.591080534401371e-06, | |
| "loss": 0.7269161939620972, | |
| "step": 14 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "grad_norm": 2.807140827178955, | |
| "learning_rate": 9.468163201617063e-06, | |
| "loss": 0.6428764462471008, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 1.0707964601769913, | |
| "grad_norm": 1.5311468839645386, | |
| "learning_rate": 9.330127018922195e-06, | |
| "loss": 0.6173319816589355, | |
| "step": 16 | |
| }, | |
| { | |
| "epoch": 1.1415929203539823, | |
| "grad_norm": 1.5018333196640015, | |
| "learning_rate": 9.177439057064684e-06, | |
| "loss": 0.6359413266181946, | |
| "step": 17 | |
| }, | |
| { | |
| "epoch": 1.2123893805309733, | |
| "grad_norm": 1.2993215322494507, | |
| "learning_rate": 9.01061596377522e-06, | |
| "loss": 0.6308578252792358, | |
| "step": 18 | |
| }, | |
| { | |
| "epoch": 1.2831858407079646, | |
| "grad_norm": 1.2826988697052002, | |
| "learning_rate": 8.83022221559489e-06, | |
| "loss": 0.5893546342849731, | |
| "step": 19 | |
| }, | |
| { | |
| "epoch": 1.3539823008849559, | |
| "grad_norm": 1.3179434537887573, | |
| "learning_rate": 8.636868207865244e-06, | |
| "loss": 0.6160678267478943, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 1.424778761061947, | |
| "grad_norm": 1.3196086883544922, | |
| "learning_rate": 8.43120818934367e-06, | |
| "loss": 0.6084617972373962, | |
| "step": 21 | |
| }, | |
| { | |
| "epoch": 1.495575221238938, | |
| "grad_norm": 1.3763041496276855, | |
| "learning_rate": 8.213938048432697e-06, | |
| "loss": 0.5884666442871094, | |
| "step": 22 | |
| }, | |
| { | |
| "epoch": 1.5663716814159292, | |
| "grad_norm": 1.3341829776763916, | |
| "learning_rate": 7.985792958513932e-06, | |
| "loss": 0.5703476667404175, | |
| "step": 23 | |
| }, | |
| { | |
| "epoch": 1.6371681415929205, | |
| "grad_norm": 1.229111671447754, | |
| "learning_rate": 7.747544890354031e-06, | |
| "loss": 0.572840690612793, | |
| "step": 24 | |
| }, | |
| { | |
| "epoch": 1.7079646017699115, | |
| "grad_norm": 1.2158163785934448, | |
| "learning_rate": 7.500000000000001e-06, | |
| "loss": 0.550726056098938, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 1.7787610619469025, | |
| "grad_norm": 1.1939095258712769, | |
| "learning_rate": 7.243995901002312e-06, | |
| "loss": 0.5565768480300903, | |
| "step": 26 | |
| }, | |
| { | |
| "epoch": 1.8495575221238938, | |
| "grad_norm": 1.1766549348831177, | |
| "learning_rate": 6.980398830195785e-06, | |
| "loss": 0.5552008152008057, | |
| "step": 27 | |
| }, | |
| { | |
| "epoch": 1.920353982300885, | |
| "grad_norm": 1.2779844999313354, | |
| "learning_rate": 6.710100716628345e-06, | |
| "loss": 0.6178507804870605, | |
| "step": 28 | |
| }, | |
| { | |
| "epoch": 1.991150442477876, | |
| "grad_norm": 1.2303086519241333, | |
| "learning_rate": 6.434016163555452e-06, | |
| "loss": 0.5532016754150391, | |
| "step": 29 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "grad_norm": 3.10593843460083, | |
| "learning_rate": 6.153079353712201e-06, | |
| "loss": 0.4448966383934021, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 2.0707964601769913, | |
| "grad_norm": 1.401031494140625, | |
| "learning_rate": 5.8682408883346535e-06, | |
| "loss": 0.4768362045288086, | |
| "step": 31 | |
| }, | |
| { | |
| "epoch": 2.1415929203539825, | |
| "grad_norm": 1.2902497053146362, | |
| "learning_rate": 5.5804645706261515e-06, | |
| "loss": 0.4592363238334656, | |
| "step": 32 | |
| }, | |
| { | |
| "epoch": 2.2123893805309733, | |
| "grad_norm": 1.1970809698104858, | |
| "learning_rate": 5.290724144552379e-06, | |
| "loss": 0.47542697191238403, | |
| "step": 33 | |
| }, | |
| { | |
| "epoch": 2.2831858407079646, | |
| "grad_norm": 1.1806858777999878, | |
| "learning_rate": 5e-06, | |
| "loss": 0.4710686206817627, | |
| "step": 34 | |
| }, | |
| { | |
| "epoch": 2.353982300884956, | |
| "grad_norm": 1.3289209604263306, | |
| "learning_rate": 4.7092758554476215e-06, | |
| "loss": 0.46914583444595337, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 2.4247787610619467, | |
| "grad_norm": 1.1916477680206299, | |
| "learning_rate": 4.4195354293738484e-06, | |
| "loss": 0.4385316073894501, | |
| "step": 36 | |
| }, | |
| { | |
| "epoch": 2.495575221238938, | |
| "grad_norm": 1.228267788887024, | |
| "learning_rate": 4.131759111665349e-06, | |
| "loss": 0.4495742917060852, | |
| "step": 37 | |
| }, | |
| { | |
| "epoch": 2.566371681415929, | |
| "grad_norm": 1.3644487857818604, | |
| "learning_rate": 3.8469206462878e-06, | |
| "loss": 0.46654635667800903, | |
| "step": 38 | |
| }, | |
| { | |
| "epoch": 2.6371681415929205, | |
| "grad_norm": 1.2453330755233765, | |
| "learning_rate": 3.5659838364445505e-06, | |
| "loss": 0.42036041617393494, | |
| "step": 39 | |
| }, | |
| { | |
| "epoch": 2.7079646017699117, | |
| "grad_norm": 1.2439433336257935, | |
| "learning_rate": 3.289899283371657e-06, | |
| "loss": 0.4493784010410309, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 2.7787610619469025, | |
| "grad_norm": 1.2308580875396729, | |
| "learning_rate": 3.019601169804216e-06, | |
| "loss": 0.44434070587158203, | |
| "step": 41 | |
| }, | |
| { | |
| "epoch": 2.849557522123894, | |
| "grad_norm": 1.1945712566375732, | |
| "learning_rate": 2.7560040989976894e-06, | |
| "loss": 0.42155495285987854, | |
| "step": 42 | |
| }, | |
| { | |
| "epoch": 2.920353982300885, | |
| "grad_norm": 1.1859475374221802, | |
| "learning_rate": 2.5000000000000015e-06, | |
| "loss": 0.40417200326919556, | |
| "step": 43 | |
| }, | |
| { | |
| "epoch": 2.991150442477876, | |
| "grad_norm": 1.2516086101531982, | |
| "learning_rate": 2.2524551096459703e-06, | |
| "loss": 0.40475600957870483, | |
| "step": 44 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "grad_norm": 2.868532419204712, | |
| "learning_rate": 2.0142070414860704e-06, | |
| "loss": 0.3524181544780731, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 3.0707964601769913, | |
| "grad_norm": 1.1654366254806519, | |
| "learning_rate": 1.7860619515673034e-06, | |
| "loss": 0.3934929370880127, | |
| "step": 46 | |
| }, | |
| { | |
| "epoch": 3.1415929203539825, | |
| "grad_norm": 1.2486796379089355, | |
| "learning_rate": 1.5687918106563326e-06, | |
| "loss": 0.35962843894958496, | |
| "step": 47 | |
| }, | |
| { | |
| "epoch": 3.2123893805309733, | |
| "grad_norm": 1.229835033416748, | |
| "learning_rate": 1.3631317921347564e-06, | |
| "loss": 0.3938334584236145, | |
| "step": 48 | |
| }, | |
| { | |
| "epoch": 3.2831858407079646, | |
| "grad_norm": 1.2063524723052979, | |
| "learning_rate": 1.1697777844051105e-06, | |
| "loss": 0.3707515597343445, | |
| "step": 49 | |
| }, | |
| { | |
| "epoch": 3.353982300884956, | |
| "grad_norm": 1.1336451768875122, | |
| "learning_rate": 9.893840362247809e-07, | |
| "loss": 0.38788312673568726, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 3.4247787610619467, | |
| "grad_norm": 1.1350209712982178, | |
| "learning_rate": 8.225609429353187e-07, | |
| "loss": 0.36757567524909973, | |
| "step": 51 | |
| }, | |
| { | |
| "epoch": 3.495575221238938, | |
| "grad_norm": 1.0958055257797241, | |
| "learning_rate": 6.698729810778065e-07, | |
| "loss": 0.375740110874176, | |
| "step": 52 | |
| }, | |
| { | |
| "epoch": 3.566371681415929, | |
| "grad_norm": 1.083740234375, | |
| "learning_rate": 5.318367983829393e-07, | |
| "loss": 0.34685075283050537, | |
| "step": 53 | |
| }, | |
| { | |
| "epoch": 3.6371681415929205, | |
| "grad_norm": 1.1857285499572754, | |
| "learning_rate": 4.089194655986306e-07, | |
| "loss": 0.3674459457397461, | |
| "step": 54 | |
| }, | |
| { | |
| "epoch": 3.7079646017699117, | |
| "grad_norm": 1.1642030477523804, | |
| "learning_rate": 3.015368960704584e-07, | |
| "loss": 0.37284308671951294, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 3.7787610619469025, | |
| "grad_norm": 1.1457759141921997, | |
| "learning_rate": 2.1005243842255552e-07, | |
| "loss": 0.3796018958091736, | |
| "step": 56 | |
| }, | |
| { | |
| "epoch": 3.849557522123894, | |
| "grad_norm": 1.1166174411773682, | |
| "learning_rate": 1.3477564710088097e-07, | |
| "loss": 0.36435168981552124, | |
| "step": 57 | |
| }, | |
| { | |
| "epoch": 3.920353982300885, | |
| "grad_norm": 1.2060168981552124, | |
| "learning_rate": 7.59612349389599e-08, | |
| "loss": 0.361666202545166, | |
| "step": 58 | |
| }, | |
| { | |
| "epoch": 3.991150442477876, | |
| "grad_norm": 1.080897569656372, | |
| "learning_rate": 3.3808211290284886e-08, | |
| "loss": 0.37428635358810425, | |
| "step": 59 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "grad_norm": 2.897923231124878, | |
| "learning_rate": 8.459208643659122e-09, | |
| "loss": 0.35041147470474243, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "step": 60, | |
| "total_flos": 2.0582894662372557e+17, | |
| "train_loss": 0.5806472768386205, | |
| "train_runtime": 493.9678, | |
| "train_samples_per_second": 7.264, | |
| "train_steps_per_second": 0.121 | |
| } | |
| ], | |
| "logging_steps": 1, | |
| "max_steps": 60, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 4, | |
| "save_steps": 200, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 2.0582894662372557e+17, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |