Prompt-Resampler-2B
prompt variation generation model
2 min read
The mithulaartigala/Prompt-Resampler-2B-SFT-Alpha-8K model is an alpha release of a tool based on the Qwen3.5-2B architecture (with 2.27 billion parameters). It is trained using the LoRA (low-rank fine-tuning) technique and designed for data augmentation—generating new, high-quality variations of text prompts without losing their original meaning and complexity. The tool outputs reformulated tasks that are useful for training other AI models or expanding datasets. This new release is ideal for AI system developers and researchers focused on gathering and preparing high-quality text data.
Key features
- Specialization: Focused on reliable prompt resampling and using fewer tokens for reasoning.
- Context length: Supports sequences up to 8,192 tokens while preserving the native structure of the base model.
- Architecture: Dense model with 2.27 billion parameters, fine-tuned on a synthetic dataset.
- Multimodality: Inherited basic multimodal capabilities from the
Qwenteam, although resampling training was conducted on text only.
What you can do
- Pipeline integration: Use the model via
vLLMorUnsloth Studioto automatically expand training datasets. - Variation generation: Create new examples for math tasks (such as GSM8K style) or classification tasks while preserving original logic.
- Prompt testing: Test the robustness of AI applications against different phrasings of user requests.
- Local deployment: Run the lightweight model on a consumer graphics card for fast testing in text processing pipelines.
Example
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "mithulaartigala/Prompt-Resampler-2B-SFT-Alpha-8K"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype="auto",
device_map="auto"
)
messages = [
{"role": "system", "content": "YOUR_SYSTEM_PROMPT"},
{"role": "user", "content": "YOUR_PROMPT"}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
with torch.inference_mode():
outputs = model.generate(
inputs,
max_new_tokens=1024,
do_sample=False
)
print(tokenizer.decode(
outputs[0][inputs.shape[-1]:],
skip_special_tokens=True
))
Read more
DetailsBenchmarks and numbers: The model card provides generation examples (such as rewriting arithmetic problems while preserving logical structure).
Requirements and training:
LoRA rank r=16, alpha=32, base model unsloth/Qwen3.5-2B, trained using the AdamW 8-bit optimizer and Cosine scheduler.Limitations: This is an alpha release; the model may struggle with rare prompt structures or overly long queries, and can sometimes generate unrealistic scenarios without additional system prompts.










Comments