Lora ckpt in HF format for NeMo AutoModel
State: closed | Pull request: yes
Labels: name: CI

name: Run CICD

# What does this PR do ?

Adds support to save Lora ckpt in HF format for NeMo automodel.


<!-- pylint-output-strict-mode-false -->

beep boop 🤖: 🙏 The following files have warnings. In case you are familiar with these, please try helping us to improve the code base.

---

Your code was analyzed with PyLint. The following annotations have been identified:

```
************* Module hf
examples/llm/peft/hf.py:28:0: C0301: Line too long (184/119) (line-too-long)
examples/llm/peft/hf.py:24:0: C0116: Missing function or method docstring (missing-function-docstring)
examples/llm/peft/hf.py:63:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.export.vllm_hf_exporter
nemo/export/vllm_hf_exporter.py:62:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/export/vllm_hf_exporter.py:104:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.lightning.io.pl
nemo/lightning/io/pl.py:82:0: C0301: Line too long (130/119) (line-too-long)
nemo/lightning/io/pl.py:58:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/io/pl.py:64:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/io/pl.py:73:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/io/pl.py:300:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/io/pl.py:305:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.lightning.pytorch.strategies.utils
nemo/lightning/pytorch/strategies/utils.py:40:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/pytorch/strategies/utils.py:49:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:57:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:69:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:85:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:120:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:142:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:197:0: C0116: Missing function or method docstring (missing-function-docstring)

-----------------------------------
Your code has been rated at 9.73/10
```

---

Mitigation guide:

* Add sensible and useful docstrings to functions and methods
* For trivial methods like getter/setters, consider adding `# pylint: disable=C0116` inside the function itself
* To disable multiple functions/methods at once, put a `# pylint: disable=C0116` before the first and a `# pylint: enable=C0116` after the last.

By applying these rules, we reduce the occurance of this message in future.

Thank you for improving NeMo's documentation!

<!-- pylint-output-strict-mode-false -->

beep boop 🤖: 🙏 The following files have warnings. In case you are familiar with these, please try helping us to improve the code base.

---

Your code was analyzed with PyLint. The following annotations have been identified:

```
************* Module hf
examples/llm/peft/hf.py:28:0: C0301: Line too long (184/119) (line-too-long)
examples/llm/peft/hf.py:24:0: C0116: Missing function or method docstring (missing-function-docstring)
examples/llm/peft/hf.py:63:0: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.export.vllm_hf_exporter
nemo/export/vllm_hf_exporter.py:62:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/export/vllm_hf_exporter.py:104:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.lightning.io.pl
nemo/lightning/io/pl.py:82:0: C0301: Line too long (130/119) (line-too-long)
nemo/lightning/io/pl.py:58:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/io/pl.py:64:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/io/pl.py:73:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/io/pl.py:300:4: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/io/pl.py:305:4: C0116: Missing function or method docstring (missing-function-docstring)
************* Module nemo.lightning.pytorch.strategies.utils
nemo/lightning/pytorch/strategies/utils.py:40:0: C0115: Missing class docstring (missing-class-docstring)
nemo/lightning/pytorch/strategies/utils.py:49:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:57:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:69:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:85:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:120:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:142:0: C0116: Missing function or method docstring (missing-function-docstring)
nemo/lightning/pytorch/strategies/utils.py:197:0: C0116: Missing function or method docstring (missing-function-docstring)

-----------------------------------
Your code has been rated at 9.73/10
```

---

Mitigation guide:

* Add sensible and useful docstrings to functions and methods
* For trivial methods like getter/setters, consider adding `# pylint: disable=C0116` inside the function itself
* To disable multiple functions/methods at once, put a `# pylint: disable=C0116` before the first and a `# pylint: enable=C0116` after the last.

By applying these rules, we reduce the occurance of this message in future.

Thank you for improving NeMo's documentation!

[🤖]: Hi @oyilmaz-nvidia 👋,

We wanted to let you know that a [CICD pipeline](https://github.com/NVIDIA/NeMo/actions/runs/12696149977) for this PR just finished successfully

So it might be time to merge this PR or get some approvals

I'm just a bot so I'll leave it you what to do next.

//cc @pablo-garay @ko3n1g