Instructions to use mjf-su/PhysicalAI-reason-VLA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mjf-su/PhysicalAI-reason-VLA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mjf-su/PhysicalAI-reason-VLA", device_map="auto") 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, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("mjf-su/PhysicalAI-reason-VLA") model = AutoModelForMultimodalLM.from_pretrained("mjf-su/PhysicalAI-reason-VLA", device_map="auto") 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 Settings
- vLLM
How to use mjf-su/PhysicalAI-reason-VLA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mjf-su/PhysicalAI-reason-VLA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mjf-su/PhysicalAI-reason-VLA", "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/mjf-su/PhysicalAI-reason-VLA
- SGLang
How to use mjf-su/PhysicalAI-reason-VLA 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 "mjf-su/PhysicalAI-reason-VLA" \ --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": "mjf-su/PhysicalAI-reason-VLA", "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 "mjf-su/PhysicalAI-reason-VLA" \ --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": "mjf-su/PhysicalAI-reason-VLA", "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 mjf-su/PhysicalAI-reason-VLA with Docker Model Runner:
docker model run hf.co/mjf-su/PhysicalAI-reason-VLA
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.6993603411513858, | |
| "eval_steps": 500, | |
| "global_step": 200, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": 0.874834306538105, | |
| "epoch": 0.08528784648187633, | |
| "grad_norm": 9.6875, | |
| "learning_rate": 1.25e-06, | |
| "loss": 0.7767, | |
| "mean_token_accuracy": 0.7803937196731567, | |
| "num_tokens": 4793533.0, | |
| "step": 10 | |
| }, | |
| { | |
| "entropy": 0.8917073860764504, | |
| "epoch": 0.17057569296375266, | |
| "grad_norm": 3.359375, | |
| "learning_rate": 2.6388888888888893e-06, | |
| "loss": 0.7228, | |
| "mean_token_accuracy": 0.7852477177977562, | |
| "num_tokens": 9585570.0, | |
| "step": 20 | |
| }, | |
| { | |
| "entropy": 0.9469680681824684, | |
| "epoch": 0.255863539445629, | |
| "grad_norm": 1.578125, | |
| "learning_rate": 4.027777777777779e-06, | |
| "loss": 0.6566, | |
| "mean_token_accuracy": 0.7953586861491203, | |
| "num_tokens": 14379575.0, | |
| "step": 30 | |
| }, | |
| { | |
| "entropy": 0.9756244793534279, | |
| "epoch": 0.3411513859275053, | |
| "grad_norm": 1.078125, | |
| "learning_rate": 4.998902091271986e-06, | |
| "loss": 0.5995, | |
| "mean_token_accuracy": 0.8040727138519287, | |
| "num_tokens": 19171868.0, | |
| "step": 40 | |
| }, | |
| { | |
| "entropy": 0.9526244938373566, | |
| "epoch": 0.42643923240938164, | |
| "grad_norm": 1.265625, | |
| "learning_rate": 4.979410528710376e-06, | |
| "loss": 0.5673, | |
| "mean_token_accuracy": 0.8092003226280212, | |
| "num_tokens": 23964483.0, | |
| "step": 50 | |
| }, | |
| { | |
| "entropy": 0.938190846145153, | |
| "epoch": 0.511727078891258, | |
| "grad_norm": 0.8984375, | |
| "learning_rate": 4.935739834765994e-06, | |
| "loss": 0.5505, | |
| "mean_token_accuracy": 0.812424935400486, | |
| "num_tokens": 28758375.0, | |
| "step": 60 | |
| }, | |
| { | |
| "entropy": 0.923903401196003, | |
| "epoch": 0.5970149253731343, | |
| "grad_norm": 2.328125, | |
| "learning_rate": 4.868315884635479e-06, | |
| "loss": 0.5386, | |
| "mean_token_accuracy": 0.8148256585001945, | |
| "num_tokens": 33553131.0, | |
| "step": 70 | |
| }, | |
| { | |
| "entropy": 0.9177967429161071, | |
| "epoch": 0.6823027718550106, | |
| "grad_norm": 0.6953125, | |
| "learning_rate": 4.7777961945024834e-06, | |
| "loss": 0.5326, | |
| "mean_token_accuracy": 0.8151497200131417, | |
| "num_tokens": 38347839.0, | |
| "step": 80 | |
| }, | |
| { | |
| "entropy": 0.905217319726944, | |
| "epoch": 0.767590618336887, | |
| "grad_norm": 0.6484375, | |
| "learning_rate": 4.665063509461098e-06, | |
| "loss": 0.5279, | |
| "mean_token_accuracy": 0.8164947971701622, | |
| "num_tokens": 43142598.0, | |
| "step": 90 | |
| }, | |
| { | |
| "entropy": 0.8973172023892403, | |
| "epoch": 0.8528784648187633, | |
| "grad_norm": 1.1796875, | |
| "learning_rate": 4.531217195014204e-06, | |
| "loss": 0.5221, | |
| "mean_token_accuracy": 0.8170435220003128, | |
| "num_tokens": 47936856.0, | |
| "step": 100 | |
| }, | |
| { | |
| "entropy": 0.8845033064484596, | |
| "epoch": 0.9381663113006397, | |
| "grad_norm": 1.7578125, | |
| "learning_rate": 4.377562516096608e-06, | |
| "loss": 0.5185, | |
| "mean_token_accuracy": 0.817681685090065, | |
| "num_tokens": 52729804.0, | |
| "step": 110 | |
| }, | |
| { | |
| "entropy": 0.879098341271684, | |
| "epoch": 1.0170575692963753, | |
| "grad_norm": 0.99609375, | |
| "learning_rate": 4.205597908173555e-06, | |
| "loss": 0.5134, | |
| "mean_token_accuracy": 0.8188003140526849, | |
| "num_tokens": 57163521.0, | |
| "step": 120 | |
| }, | |
| { | |
| "entropy": 0.8732256084680557, | |
| "epoch": 1.1023454157782515, | |
| "grad_norm": 0.93359375, | |
| "learning_rate": 4.0170003645464835e-06, | |
| "loss": 0.512, | |
| "mean_token_accuracy": 0.8187085539102554, | |
| "num_tokens": 61956161.0, | |
| "step": 130 | |
| }, | |
| { | |
| "entropy": 0.8677664533257484, | |
| "epoch": 1.187633262260128, | |
| "grad_norm": 2.578125, | |
| "learning_rate": 3.8136090823685156e-06, | |
| "loss": 0.5085, | |
| "mean_token_accuracy": 0.8195212766528129, | |
| "num_tokens": 66749986.0, | |
| "step": 140 | |
| }, | |
| { | |
| "entropy": 0.8661862865090371, | |
| "epoch": 1.2729211087420043, | |
| "grad_norm": 1.140625, | |
| "learning_rate": 3.5974075268532354e-06, | |
| "loss": 0.5094, | |
| "mean_token_accuracy": 0.8192538529634475, | |
| "num_tokens": 71544876.0, | |
| "step": 150 | |
| }, | |
| { | |
| "entropy": 0.8664106726646423, | |
| "epoch": 1.3582089552238805, | |
| "grad_norm": 0.65625, | |
| "learning_rate": 3.3705040885859975e-06, | |
| "loss": 0.5066, | |
| "mean_token_accuracy": 0.819321508705616, | |
| "num_tokens": 76337411.0, | |
| "step": 160 | |
| }, | |
| { | |
| "entropy": 0.8632829263806343, | |
| "epoch": 1.443496801705757, | |
| "grad_norm": 0.65625, | |
| "learning_rate": 3.1351115225670483e-06, | |
| "loss": 0.5053, | |
| "mean_token_accuracy": 0.8198848024010659, | |
| "num_tokens": 81131176.0, | |
| "step": 170 | |
| }, | |
| { | |
| "entropy": 0.863217756152153, | |
| "epoch": 1.5287846481876333, | |
| "grad_norm": 0.828125, | |
| "learning_rate": 2.8935253694962414e-06, | |
| "loss": 0.5, | |
| "mean_token_accuracy": 0.8213705286383629, | |
| "num_tokens": 85924602.0, | |
| "step": 180 | |
| }, | |
| { | |
| "entropy": 0.8621790811419487, | |
| "epoch": 1.6140724946695095, | |
| "grad_norm": 0.7890625, | |
| "learning_rate": 2.648101569734286e-06, | |
| "loss": 0.5007, | |
| "mean_token_accuracy": 0.8213415816426277, | |
| "num_tokens": 90719186.0, | |
| "step": 190 | |
| }, | |
| { | |
| "entropy": 0.8626999795436859, | |
| "epoch": 1.6993603411513858, | |
| "grad_norm": 0.8828125, | |
| "learning_rate": 2.4012334882484554e-06, | |
| "loss": 0.5007, | |
| "mean_token_accuracy": 0.8213708132505417, | |
| "num_tokens": 95511554.0, | |
| "step": 200 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 354, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 3, | |
| "save_steps": 100, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 2.347599815136772e+18, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |