Instructions to use RoseG/MAiRYSTAR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RoseG/MAiRYSTAR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RoseG/MAiRYSTAR") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("RoseG/MAiRYSTAR") model = AutoModelForMultimodalLM.from_pretrained("RoseG/MAiRYSTAR", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RoseG/MAiRYSTAR with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RoseG/MAiRYSTAR" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RoseG/MAiRYSTAR", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RoseG/MAiRYSTAR
- SGLang
How to use RoseG/MAiRYSTAR 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 "RoseG/MAiRYSTAR" \ --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": "RoseG/MAiRYSTAR", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "RoseG/MAiRYSTAR" \ --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": "RoseG/MAiRYSTAR", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RoseG/MAiRYSTAR with Docker Model Runner:
docker model run hf.co/RoseG/MAiRYSTAR
Download trainer_state.json from RoseG/MAiRYSTAR: direct link, hf CLI and curl.
- Browser
- Download file 8.39 kB
-
https://huggingface.co/RoseG/MAiRYSTAR/resolve/main/trainer_state.json
- Command line
-
hf download hf://RoseG/MAiRYSTAR/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/RoseG/MAiRYSTAR/resolve/main/trainer_state.json
8.39 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 2.0, | |
| "eval_steps": 42, | |
| "global_step": 42, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.047619047619047616, | |
| "grad_norm": 9.980156898498535, | |
| "learning_rate": 2e-05, | |
| "loss": 2.1337890625, | |
| "step": 1 | |
| }, | |
| { | |
| "epoch": 0.09523809523809523, | |
| "grad_norm": 7.115320205688477, | |
| "learning_rate": 1.9972037971811802e-05, | |
| "loss": 1.4287109375, | |
| "step": 2 | |
| }, | |
| { | |
| "epoch": 0.14285714285714285, | |
| "grad_norm": 10.563518524169922, | |
| "learning_rate": 1.9888308262251286e-05, | |
| "loss": 1.23828125, | |
| "step": 3 | |
| }, | |
| { | |
| "epoch": 0.19047619047619047, | |
| "grad_norm": 2.9927895069122314, | |
| "learning_rate": 1.9749279121818235e-05, | |
| "loss": 1.14501953125, | |
| "step": 4 | |
| }, | |
| { | |
| "epoch": 0.23809523809523808, | |
| "grad_norm": 3.276383399963379, | |
| "learning_rate": 1.955572805786141e-05, | |
| "loss": 1.09228515625, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.2857142857142857, | |
| "grad_norm": 2.283390760421753, | |
| "learning_rate": 1.9308737486442045e-05, | |
| "loss": 1.0439453125, | |
| "step": 6 | |
| }, | |
| { | |
| "epoch": 0.3333333333333333, | |
| "grad_norm": 1.6059461832046509, | |
| "learning_rate": 1.900968867902419e-05, | |
| "loss": 1.0419921875, | |
| "step": 7 | |
| }, | |
| { | |
| "epoch": 0.38095238095238093, | |
| "grad_norm": 1.7341160774230957, | |
| "learning_rate": 1.866025403784439e-05, | |
| "loss": 1.01220703125, | |
| "step": 8 | |
| }, | |
| { | |
| "epoch": 0.42857142857142855, | |
| "grad_norm": 1.2254583835601807, | |
| "learning_rate": 1.826238774315995e-05, | |
| "loss": 1.013671875, | |
| "step": 9 | |
| }, | |
| { | |
| "epoch": 0.47619047619047616, | |
| "grad_norm": 1.5042554140090942, | |
| "learning_rate": 1.78183148246803e-05, | |
| "loss": 1.013671875, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.5238095238095238, | |
| "grad_norm": 1.213415503501892, | |
| "learning_rate": 1.7330518718298263e-05, | |
| "loss": 1.03662109375, | |
| "step": 11 | |
| }, | |
| { | |
| "epoch": 0.5714285714285714, | |
| "grad_norm": 1.2206931114196777, | |
| "learning_rate": 1.6801727377709195e-05, | |
| "loss": 1.00732421875, | |
| "step": 12 | |
| }, | |
| { | |
| "epoch": 0.6190476190476191, | |
| "grad_norm": 1.0425015687942505, | |
| "learning_rate": 1.6234898018587336e-05, | |
| "loss": 0.974609375, | |
| "step": 13 | |
| }, | |
| { | |
| "epoch": 0.6666666666666666, | |
| "grad_norm": 1.1242820024490356, | |
| "learning_rate": 1.563320058063622e-05, | |
| "loss": 0.9814453125, | |
| "step": 14 | |
| }, | |
| { | |
| "epoch": 0.7142857142857143, | |
| "grad_norm": 0.9458146691322327, | |
| "learning_rate": 1.5000000000000002e-05, | |
| "loss": 0.96875, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.7619047619047619, | |
| "grad_norm": 0.9981818795204163, | |
| "learning_rate": 1.4338837391175582e-05, | |
| "loss": 0.96142578125, | |
| "step": 16 | |
| }, | |
| { | |
| "epoch": 0.8095238095238095, | |
| "grad_norm": 0.9959944486618042, | |
| "learning_rate": 1.3653410243663953e-05, | |
| "loss": 0.9775390625, | |
| "step": 17 | |
| }, | |
| { | |
| "epoch": 0.8571428571428571, | |
| "grad_norm": 0.9807628989219666, | |
| "learning_rate": 1.2947551744109044e-05, | |
| "loss": 0.95849609375, | |
| "step": 18 | |
| }, | |
| { | |
| "epoch": 0.9047619047619048, | |
| "grad_norm": 0.964298665523529, | |
| "learning_rate": 1.2225209339563144e-05, | |
| "loss": 0.94970703125, | |
| "step": 19 | |
| }, | |
| { | |
| "epoch": 0.9523809523809523, | |
| "grad_norm": 0.9234592914581299, | |
| "learning_rate": 1.1490422661761744e-05, | |
| "loss": 0.91455078125, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "grad_norm": 1.1632379293441772, | |
| "learning_rate": 1.0747300935864245e-05, | |
| "loss": 0.8896484375, | |
| "step": 21 | |
| }, | |
| { | |
| "epoch": 1.0476190476190477, | |
| "grad_norm": 1.1696614027023315, | |
| "learning_rate": 1e-05, | |
| "loss": 0.833984375, | |
| "step": 22 | |
| }, | |
| { | |
| "epoch": 1.0952380952380953, | |
| "grad_norm": 1.0527235269546509, | |
| "learning_rate": 9.252699064135759e-06, | |
| "loss": 0.83251953125, | |
| "step": 23 | |
| }, | |
| { | |
| "epoch": 1.1428571428571428, | |
| "grad_norm": 1.2121893167495728, | |
| "learning_rate": 8.509577338238255e-06, | |
| "loss": 0.87744140625, | |
| "step": 24 | |
| }, | |
| { | |
| "epoch": 1.1904761904761905, | |
| "grad_norm": 1.0663219690322876, | |
| "learning_rate": 7.774790660436857e-06, | |
| "loss": 0.783203125, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 1.2380952380952381, | |
| "grad_norm": 1.0903716087341309, | |
| "learning_rate": 7.052448255890958e-06, | |
| "loss": 0.791015625, | |
| "step": 26 | |
| }, | |
| { | |
| "epoch": 1.2857142857142856, | |
| "grad_norm": 1.0819926261901855, | |
| "learning_rate": 6.34658975633605e-06, | |
| "loss": 0.7333984375, | |
| "step": 27 | |
| }, | |
| { | |
| "epoch": 1.3333333333333333, | |
| "grad_norm": 1.158378005027771, | |
| "learning_rate": 5.66116260882442e-06, | |
| "loss": 0.7041015625, | |
| "step": 28 | |
| }, | |
| { | |
| "epoch": 1.380952380952381, | |
| "grad_norm": 1.0132827758789062, | |
| "learning_rate": 5.000000000000003e-06, | |
| "loss": 0.72119140625, | |
| "step": 29 | |
| }, | |
| { | |
| "epoch": 1.4285714285714286, | |
| "grad_norm": 1.042487382888794, | |
| "learning_rate": 4.3667994193637794e-06, | |
| "loss": 0.68017578125, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 1.4761904761904763, | |
| "grad_norm": 1.0347169637680054, | |
| "learning_rate": 3.7651019814126656e-06, | |
| "loss": 0.71728515625, | |
| "step": 31 | |
| }, | |
| { | |
| "epoch": 1.5238095238095237, | |
| "grad_norm": 1.0562595129013062, | |
| "learning_rate": 3.1982726222908046e-06, | |
| "loss": 0.71826171875, | |
| "step": 32 | |
| }, | |
| { | |
| "epoch": 1.5714285714285714, | |
| "grad_norm": 0.991810142993927, | |
| "learning_rate": 2.669481281701739e-06, | |
| "loss": 0.70751953125, | |
| "step": 33 | |
| }, | |
| { | |
| "epoch": 1.619047619047619, | |
| "grad_norm": 1.035168170928955, | |
| "learning_rate": 2.1816851753197023e-06, | |
| "loss": 0.667236328125, | |
| "step": 34 | |
| }, | |
| { | |
| "epoch": 1.6666666666666665, | |
| "grad_norm": 1.1264833211898804, | |
| "learning_rate": 1.7376122568400533e-06, | |
| "loss": 0.71240234375, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 1.7142857142857144, | |
| "grad_norm": 0.9847052693367004, | |
| "learning_rate": 1.339745962155613e-06, | |
| "loss": 0.69384765625, | |
| "step": 36 | |
| }, | |
| { | |
| "epoch": 1.7619047619047619, | |
| "grad_norm": 0.9455327391624451, | |
| "learning_rate": 9.903113209758098e-07, | |
| "loss": 0.70068359375, | |
| "step": 37 | |
| }, | |
| { | |
| "epoch": 1.8095238095238095, | |
| "grad_norm": 1.0034749507904053, | |
| "learning_rate": 6.912625135579587e-07, | |
| "loss": 0.736328125, | |
| "step": 38 | |
| }, | |
| { | |
| "epoch": 1.8571428571428572, | |
| "grad_norm": 1.0284539461135864, | |
| "learning_rate": 4.4427194213859216e-07, | |
| "loss": 0.73876953125, | |
| "step": 39 | |
| }, | |
| { | |
| "epoch": 1.9047619047619047, | |
| "grad_norm": 1.0030890703201294, | |
| "learning_rate": 2.507208781817638e-07, | |
| "loss": 0.74560546875, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 1.9523809523809523, | |
| "grad_norm": 0.9933129549026489, | |
| "learning_rate": 1.1169173774871478e-07, | |
| "loss": 0.73046875, | |
| "step": 41 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "grad_norm": 0.860466718673706, | |
| "learning_rate": 2.796202818819871e-08, | |
| "loss": 0.654296875, | |
| "step": 42 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "eval_loss": 0.5107421875, | |
| "eval_runtime": 12.404, | |
| "eval_samples_per_second": 0.161, | |
| "eval_steps_per_second": 0.081, | |
| "step": 42 | |
| } | |
| ], | |
| "logging_steps": 1.0, | |
| "max_steps": 42, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 2, | |
| "save_steps": 0, | |
| "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.0636117736043315e+17, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |