HQQ-270M model is developed by Sashvat AI by finetuning Gemma-3
It specializes in transforming complex, multi-layered user queries into optimized, high-quality Google search queries .
⚠️ Usage Requirement :
All input queries must begin with the prefix HQQ: ( short for High Quality Query ) .
This ensures the model knows the input is intended for query optimization .
🔍 What does it do?
Converts Deep research prompts into precise search queries.
Handles Broad or ambiguous questions by breaking them into focused, search-ready chunks.
Enhances information retrieval by optimizing queries for search engines.
1# Load model directly2from transformers import AutoTokenizer, AutoModelForCausalLM
34tokenizer = AutoTokenizer.from_pretrained("Sashvat/HQQ-270M")5model = AutoModelForCausalLM.from_pretrained("Sashvat/HQQ-270M")67system_prompt ="""
8Convert text after "HQQ: " into an optimized Google search query. Extract key terms, remove filler words, focus on searchable keywords.
9"""1011query ="HQQ: What are the economic, political, and environmental implications of large-scale adoption of nuclear fusion by 2050?"1213messages =[14{"role":"system","content": system_prompt },15{"role":"user","content": query }16]1718inputs = tokenizer.apply_chat_template(19 messages,20 add_generation_prompt=True,21 tokenize=True,22 return_dict=True,23 return_tensors="pt",24).to(model.device)2526outputs = model.generate(**inputs, max_new_tokens=256)27print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
🚀 Example Output :-
Input:
HQQ: What are the economic, political, and environmental implications of large-scale adoption of nuclear fusion by 2050?
Output :
"economic political environmental implications" "large-scale adoption nuclear fusion" 2050
Training Loss vs Steps :-
Note : 500 Steps / ~6 Epochs
📊 Intended Use :-
This model is intended for :
Query optimization for Google search and other search engines
Information retrieval pipelines .
Assisting deep research tasks .
⚠️ Important : Input must always begin with HQQ: . Without this prefix , results may be unpredictable .
📜 License
This model is released under the Sashvat AI License v1.0.
You may freely use, modify, and distribute this model, including for commercial purposes .
However, any use must clearly state :