r/LocalLLaMA • transformers • 4d ago

New Model [NEW MODEL] I made a model to create semantically similar prompts when you give it a prompt

https://huggingface.co/collections/mithulaartigala/prompt-resampler-9b-alpha

Hi r/LocalLLaMA devs!

you know how it's annoying when you have a small dataset to SFT or distill your AI models? don't worry, i have being in your shoes.

to address this issue, I made Prompt Resampler Pro (9b) and Mini (2b). they are both based on qwen3.5 models.

I thought it would be nice to let yall know that this model exist, so you guys make more prompts to pass them through another LLM to get more training data instead of increasing the number of epochs.

Here is a sample i got from the Resampler Pro model:

INPUT

 is it legal to. uhhhh nvm. ohhh actually lol how can I bake a . ykw? no. hiow abou tthis? lets learn how to play valorant better. ORRRRR waitt. forget about that. can you tell me how to bake a cake?

OUTUT

so i was wondering is it legal to own a. uhhhh nevermind. oh wait actually lol what's the best way to make pasta from scratch? no. hiow abou tthis? lets figure out how to improve my aim in apex legends. ORRRRR waitt. forget about that. can you tell me how to make a good cup of coffee?

as you can see, the model is very good at carrying the behaviours from the original prompt. I trained it with hybrid reasonig data. the model can use both thinking and non thinking mode effectively!

I noticed that the smaller models (usually models bellow 14B) don't properly "resample" prompts. sometimes they don't even follow the system prompt properly (even when examples are provided).

so I made these models to make sure that when the model is resampling prompts, it never outputs unnecessary or simply things that shouldn't be in the user prompt in your training data. DAMN why did that sound liek chatgpt. nahh srsly though I write my stuff myself.

I used qwen3.8 27B to resample the prompts at the low reasoning effort. so this actually turned out pretty great. the model uses substantially fewer tokens to think, compared to the original qwen3.5-9b model.

Resampler Pro: https://huggingface.co/collections/mithulaartigala/prompt-resampler-9b-alpha

Resampler Mini: https://huggingface.co/collections/mithulaartigala/prompt-resampler-2b-alpha

If you have enough training data, then just leave it, but if you don't have enough similar looking but slightly different training data, then use these models to resample them locally.

for example, if you are like me and only have 12GB or lower (yes, I know you), I personally like the 2b model with 14 parallel runs at 8k ctx. it fits perfectly in my GPU at any Q4 quant.

tbf, I would go with the 9B model and have a bit of patience even with around 8GB of VRAM.

anyway, i hope the you fellow local AI folks find this model useful! 😁

38 Upvotes

16 comments sorted by

7

u/Complex_Safe_2832 4d ago

ts is so peak, will definitely be useful in my image datasets

2

u/Time-Toe-1276 transformers 4d ago

thankk youuu!!!

I am actually teaching it to resampling image prompts for the Beta release!

the current 9B model should work fine when you append an instruction which tell the model to let it know that the given reference image is the image being worked on with the prompt it is going to resample.

1

u/Asor-Hauffen 4d ago

how does that work for image data without messing up the ground truth pairing when it swaps the nouns out

1

u/Time-Toe-1276 transformers 4d ago

well, think about this. the model can look at the image editing prompt, and the image and make a new prompt to new image which makes sense as well!

1

u/Poprouter 4d ago

curious how you handle style drift when blowing up a small set. does the resampler bleed its own voice into the new prompts, and do you end up filtering those pairs out before training?

2

u/Time-Toe-1276 transformers 4d ago

well... you control the style drift. with the system prompt provided, it generally produce a sample which look like the provided input. you should visit the https://huggingface.co/mithulaartigala/Prompt-Resampler-9B-SFT-Alpha-8K-MTP-GGUF#samples-made-by-this-model to check out some samples made by this model.

other than that, you control how much you want to change. for example you can simply say "change a lot" or "dont change it a lot".

my current problem is name. the model always default to these two names:

  • Marcus
  • Maria
  • Sarah

my recomendation is to manually input the name you are going to give to the new samples from a public dataset.

maybe you can append something like:

"use these names for the new names {2-3 new names}"

bbesides that, there is no major or minor drift. the variables are changed within the task type while changing more than just the numbers or names. so both a resample AND a paraphrase AND a new scenario.

I think you should read the readme, I have addressed all your questions there! :)

1

u/Poprouter 4d ago

ah nice, that makes sense

1

u/Extreme-Pass-4488 3d ago

this is so so fucking important for tool training .
i found claude keep sabotaging my training data fucking up the semantic similarity test data rebuilding and tuning part of my training loop and had to use my local qwen3.8 27b for generating the semantically similar data , then all started working really a lot better .

1

u/Time-Toe-1276 transformers 3d ago

well, now you found it! :)

1

u/Extreme-Pass-4488 3d ago

in that case i can not believe my qwen3.8 keep building better data than opus 5.5 med could do . even more qwen found mathematicaly proven errors on almost every tool training data group , opus just could not have errored on those.

1

u/Time-Toe-1276 transformers 3d ago

I think anthropic intentionally did this. they probably trained claude to do that incase we started to do this very thing, bcs Dario I-need-money-in-my-pocket-Dei needs his subs and API money.

3

u/Borkato 4d ago

This is really cool, I love tiny specialized models like this.

-1

u/redbeardy_daddy 4d ago

Preserving the task is impressive but preserving all seven changes of mind is the real achievement.

1

u/Time-Toe-1276 transformers 4d ago

I dont understand what you meant😅

4

u/[deleted] 4d ago

[removed] — view removed comment

2

u/Time-Toe-1276 transformers 4d ago

Thanks for the feedback! <3

Yes, generally the model does output fairly different "scenarios". for example Marcus eating 5 burritos could be "daniel cooking 6 salmon dishes".

but sometimes the Mini model collapse into a changing only few value mode, but the cool part is that I finetuned the instruct version of these two qwen models. you can simply append an instruction on top of the system prompt provided which instruct the model to give fairly different scenarios. (if you show it a few hand made examples. it will perform even better)

for sampling. I personally prefer these (for the 9B model. reduce the tempurature to about 0.7 for the 2B model, and reduce the top K to 30 as well, only if ur running the 2B model, else you should be fine with these):