Subquery
Subquery generates subqueries and follow-up questions for a given input question.
Using the EXTREMELY SMOLL LLM subquery-SmolLM
It's a finetuned model based on nisten/Biggie-SmoLlm-0.15B-Base
tiny as 150M (or 180M) parameters and thanks to wonderful work by Nisten and Huggingface's SmolLM-135M
It can run both with transformers and ollama backends.
Ollama based GGUF model runs at 160 tps for 1 CPU.
yes.
It can do two things:
- Generate subqueries for a given question.
- Generate follow-up questions for a vague question.
This package wraps the model and provides a simple interface to generate subqueries and follow-up questions.
Installation
You can install the package with
pip install subquery
Usage
For Transformers
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)
For Ollama
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)
Metadata
Release files for subquery 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| subquery-0.1.2.tar.gz | 2.9 kB | Without provenance | Details for subquery-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| subquery-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for subquery-0.1.2-py3-none-any.whl |
Total release size: 7.2 kB
Release files / subquery-0.1.2.tar.gz
| Download URL | subquery-0.1.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b89fc5bb4e76003734be9eed1847a34a39edc35317af2a3cff548d820e9f54c
|
|
BLAKE2b-256 checksum How to use checksums |
1651af2aaf6b4754a1e173248206863f0bb63c739bde37940ea1e32ae2a10c79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.11.6 Darwin/23.3.0
|
Release files / subquery-0.1.2-py3-none-any.whl
| Download URL | subquery-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa5145bdc89cf9b3f4a5d50809753bf2a118ca648f29362c4e9062f4de2f8d56
|
|
BLAKE2b-256 checksum How to use checksums |
7f61225501d59fc5b0816b6be2a8bb01ce7c10e821503387de627d6db6e55bd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.11.6 Darwin/23.3.0
|
Security for subquery 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.