Run this model with HF Jobs
Run yloa/lora_model_21 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/yloa/lora_model_21. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/yloa/lora_model_21 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use yloa/lora_model_21 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yloa/lora_model_21 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("yloa/lora_model_21", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Training in progress, step 10
Browse filesFiles changed (13)
- .gitattributes+1
- README.mdAdded+59
- adapter_config.jsonAdded+46
- adapter_model.safetensorsAdded+3
- added_tokens.jsonAdded+3
- chat_template.jinjaAdded+47
- preprocessor_config.jsonAdded+29
- processor_config.jsonAdded+4
- special_tokens_map.jsonAdded+33
- tokenizer.jsonAdded+3
- tokenizer.modelAdded+3
- tokenizer_config.jsonAdded
- training_args.binAdded+3
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859---base_model: unsloth/medgemma-4b-it-unsloth-bnb-4bitlibrary_name: transformersmodel_name: lora_model_21tags:- generated_from_trainer- sft- trl- unslothlicence: license---
# Model Card for lora_model_21
This model is a fine-tuned version of [unsloth/medgemma-4b-it-unsloth-bnb-4bit](https://huggingface.co/unsloth/medgemma-4b-it-unsloth-bnb-4bit).It has been trained using [TRL](https://github.com/huggingface/trl).
## Quick start
```pythonfrom transformers import pipeline
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"generator = pipeline("text-generation", model="yloa/lora_model_21", device="cuda")output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]print(output["generated_text"])```
## Training procedure
This model was trained with SFT.
### Framework versions
- TRL: 0.24.0- Transformers: 4.57.2- Pytorch: 2.9.0- Datasets: 4.3.0- Tokenizers: 0.22.1
## Citations
Cite TRL as: ```bibtex@misc{vonwerra2022trl, title = {{TRL: Transformer Reinforcement Learning}}, author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec}, year = 2020, journal = {GitHub repository}, publisher = {GitHub}, howpublished = {\url{https://github.com/huggingface/trl}}}```12345678910111213141516171819202122232425262728293031323334353637383940414243444546{ "alpha_pattern": {}, "auto_mapping": { "base_model_class": "Gemma3ForConditionalGeneration", "parent_library": "transformers.models.gemma3.modeling_gemma3", "unsloth_fixed": true }, "base_model_name_or_path": "unsloth/medgemma-4b-it-unsloth-bnb-4bit", "bias": "none", "corda_config": null, "eva_config": null, "exclude_modules": null, "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layer_replication": null, "layers_pattern": null, "layers_to_transform": null, "loftq_config": {}, "lora_alpha": 8, "lora_bias": false, "lora_dropout": 0.1, "megatron_config": null, "megatron_core": "megatron.core", "modules_to_save": null, "peft_type": "LORA", "qalora_group_size": 16, "r": 16, "rank_pattern": {}, "revision": null, "target_modules": [ "fc1", "fc2", "gate_proj", "v_proj", "up_proj", "down_proj", "q_proj", "linear" ], "task_type": "CAUSAL_LM", "trainable_token_indices": null, "use_dora": false, "use_qalora": false, "use_rslora": false}123version https://git-lfs.github.com/spec/v1oid sha256:4de4df09c2eca0c859ca2725955eef77190732b92a67c969484658d778171740size 128288864123{ "<image_soft_token>": 262144}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647{{ bos_token }}{%- if messages[0]['role'] == 'system' -%} {%- if messages[0]['content'] is string -%} {%- set first_user_prefix = messages[0]['content'] + '
' -%} {%- else -%} {%- set first_user_prefix = messages[0]['content'][0]['text'] + '
' -%} {%- endif -%} {%- set loop_messages = messages[1:] -%}{%- else -%} {%- set first_user_prefix = "" -%} {%- set loop_messages = messages -%}{%- endif -%}{%- for message in loop_messages -%} {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%} {{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }} {%- endif -%} {%- if (message['role'] == 'assistant') -%} {%- set role = "model" -%} {%- else -%} {%- set role = message['role'] -%} {%- endif -%} {{ '<start_of_turn>' + role + '' + (first_user_prefix if loop.first else "") }} {%- if message['content'] is string -%} {{ message['content'] | trim }} {%- elif message['content'] is iterable -%} {%- for item in message['content'] -%} {%- if item['type'] == 'image' -%} {{ '<start_of_image>' }} {%- elif item['type'] == 'text' -%} {{ item['text'] | trim }} {%- endif -%} {%- endfor -%} {%- else -%} {{ raise_exception("Invalid content type") }} {%- endif -%} {{ '<end_of_turn>' }}{%- endfor -%}{%- if add_generation_prompt -%} {{'<start_of_turn>model'}}{%- endif -%}1234567891011121314151617181920212223242526272829{ "do_convert_rgb": null, "do_normalize": true, "do_pan_and_scan": null, "do_rescale": true, "do_resize": true, "image_mean": [ 0.5, 0.5, 0.5 ], "image_processor_type": "Gemma3ImageProcessor", "image_seq_length": 256, "image_std": [ 0.5, 0.5, 0.5 ], "pan_and_scan_max_num_crops": null, "pan_and_scan_min_crop_size": null, "pan_and_scan_min_ratio_to_activate": null, "processor_class": "Gemma3Processor", "resample": 2, "rescale_factor": 0.00392156862745098, "size": { "height": 896, "width": 896 }}1234{ "image_seq_length": 256, "processor_class": "Gemma3Processor"}123456789101112131415161718192021222324252627282930313233{ "boi_token": "<start_of_image>", "bos_token": { "content": "<bos>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eoi_token": "<end_of_image>", "eos_token": { "content": "<end_of_turn>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "image_token": "<image_soft_token>", "pad_token": { "content": "<pad>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:7666402c0617d170e6b0a985b3130c3fb0795393aa0970600994a5d9aae12351size 33384822123version https://git-lfs.github.com/spec/v1oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79csize 4689074123version https://git-lfs.github.com/spec/v1oid sha256:1360e4324d0b1e45f9de02fc9d041ae97d82b7693b9b7d1b381b43189e03a711size 6353.gitattributes+1
README.mdAdded+59
adapter_config.jsonAdded+46
adapter_model.safetensorsAdded+3
added_tokens.jsonAdded+3
chat_template.jinjaAdded+47
preprocessor_config.jsonAdded+29
processor_config.jsonAdded+4
special_tokens_map.jsonAdded+33
tokenizer.jsonAdded+3
tokenizer.modelAdded+3
tokenizer_config.jsonAdded
training_args.binAdded+3