Downloads · 30 days
138
8% of all-time downloads
RichardErkhov/andthattoo_-_subquery-SmolLM-gguf
andthattoo_-_subquery-SmolLM-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
138
8% of all-time downloads
All-time downloads
1.8K
Public
Repo size
2.2 GB
Likes
2
Public
Click a slice to open those files.
.gguf2.5 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
subquery-SmolLM - GGUF
| Name | Quant method | Size |
|---|---|---|
| subquery-SmolLM.Q2_K.gguf | Q2_K | 0.09GB |
| subquery-SmolLM.IQ3_XS.gguf | IQ3_XS | 0.09GB |
| subquery-SmolLM.IQ3_S.gguf | IQ3_S | 0.09GB |
| subquery-SmolLM.Q3_K_S.gguf | Q3_K_S | 0.09GB |
| subquery-SmolLM.IQ3_M.gguf | IQ3_M | 0.09GB |
| subquery-SmolLM.Q3_K.gguf | Q3_K | 0.1GB |
| subquery-SmolLM.Q3_K_M.gguf | Q3_K_M | 0.1GB |
| subquery-SmolLM.Q3_K_L.gguf | Q3_K_L | 0.1GB |
| subquery-SmolLM.IQ4_XS.gguf | IQ4_XS | 0.09GB |
| subquery-SmolLM.Q4_0.gguf | Q4_0 | 0.09GB |
| subquery-SmolLM.IQ4_NL.gguf | IQ4_NL | 0.1GB |
| subquery-SmolLM.Q4_K_S.gguf | Q4_K_S | 0.11GB |
| subquery-SmolLM.Q4_K.gguf | Q4_K | 0.11GB |
| subquery-SmolLM.Q4_K_M.gguf | Q4_K_M | 0.11GB |
| subquery-SmolLM.Q4_1.gguf | Q4_1 | 0.1GB |
| subquery-SmolLM.Q5_0.gguf | Q5_0 | 0.11GB |
| subquery-SmolLM.Q5_K_S.gguf | Q5_K_S | 0.11GB |
| subquery-SmolLM.Q5_K.gguf | Q5_K | 0.12GB |
| subquery-SmolLM.Q5_K_M.gguf | Q5_K_M | 0.12GB |
| subquery-SmolLM.Q5_1.gguf | Q5_1 | 0.12GB |
| subquery-SmolLM.Q6_K.gguf | Q6_K | 0.15GB |
| subquery-SmolLM.Q8_0.gguf | Q8_0 | 0.15GB |
base_model: nisten/Biggie-SmoLlm-0.15B-Base license: mit datasets:
This dude is trained for boosting the performance of your RAG based question answering app
My motivation was to tackle a core problem of RAG with an extremely lightweight, but capable model.
If queries are
Training data was generated with Dria: A decentralized p2p network for synthetic data. Join discord to help decentralized data generation.
Heads up: Ollama version works 160 tps on 1 CPU core. No GPU? No worries. This little dude’s got you.
Use the model:
from transformers import AutoModel, AutoConfig, AutoTokenizer, AutoModelForCausalLM
config = AutoConfig.from_pretrained("andthattoo/subquery-SmolLM")
tokenizer = AutoTokenizer.from_pretrained("andthattoo/subquery-SmolLM")
model = AutoModelForCausalLM.from_pretrained("andthattoo/subquery-SmolLM", torch_dtype=torch.bfloat16)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
model.config.pad_token_id = model.config.eos_token_id
input_data = "Generate subqueries for a given question. <question>What is this?</question>"
inputs = tokenizer(input_data, return_tensors='pt')
output = model.generate(**inputs, max_new_tokens=100)
decoded_output = tokenizer.decode(output[0], skip_special_tokens=True)
Also created a python package for ease of use
pip install subquery
from subquery import TransformersSubqueryGenerator
# Using the Transformers backend
generator = TransformersSubqueryGenerator()
result = generator.generate("What is this?")
print("Follow-up questions:", result.follow_up)
print("Subqueries:", result.subquery)
or
from subquery import OllamaSubqueryGenerator
# Using the Ollama backend
generator = OllamaSubqueryGenerator()
result = generator.generate("Are the Indiana Harbor and Ship Canal and the Folsom South Canal in the same state?")
print("Follow-up questions:", result.follow_up)
print("Subqueries:", result.subquery)