# Qlora adapter with smolagents

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fqlora-adapter-with-smolagents%2F139746%3E%5C
**Category:** Beginners\
**Created:** [February 8, 2025, 6:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fqlora-adapter-with-smolagents%2F139746 "2025-02-08T18:40:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmacfarlane](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nmacfarlane](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnmacfarlane)%5C
**Post date:** [February 8, 2025, 6:40pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fqlora-adapter-with-smolagents%2F139746%2F1 "2025-02-08T18:40:33Z")

</div>

Hello - I want to use my qlora adapter with smolagents. Is this possible?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [February 9, 2025, 3:56am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fqlora-adapter-with-smolagents%2F139746%2F2 "2025-02-09T03:56:25Z")

</div>

I think it might work using the method below. If it doesn’t work, you’ll probably need to merge it yourself and save it locally or upload it to HF…  
Or, I think it will be addressed if you raise an issue on github. It’s a necessary function.😅

> **[TransformersModel - Models](https://huggingface.co/docs/smolagents/reference/models#smolagents.TransformersModel)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

```auto
from smolagents import TransformersModel

# model_id = "HuggingFaceTB/SmolLM-135M-Instruct"
model_id = "bunnycore/Llama-3.2-3B-R1-lora" # An adapter with appropriate "base_model:" setting
model = TransformersModel(model_id=model_id)

print(model([{"role": "user", "content": [{"type": "text", "text": "Ok!"}]}], stop_sequences=["great"]))

```

### Tips

[https://github.com/huggingface/smolagents/issues/414](https://github.com/huggingface/smolagents/issues/414)
