MistralAI Questionnaire
This project provides a toolkit for generating questionnaire from documents: [txt, docx, pdf] to .csv dataset format.
Requirements
Before starting, you need to install the following libraries: .. code-block:: python
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
langchainlangchain_communitylangchain-huggingfaceplaywrighthtml2textsentence_transformersfaiss-cpupandaspeft==0.4.0trl==0.4.7pypdfbitsandbytesaccelerate
Description
ModelManager
This class is responsible for loading mistralai model and generating QA.
Constructor
^^^^^^^^^^^
.. code-block:: python
__init__(self, model_name)
- **model_name**: The path or name of the pre-trained model.
Methods
^^^^^^^
- **setup_tokenizer()**: Loads and configures the tokenizer for the model.
- **setup_bitsandbytes_parameters()**: Configures parameters for bit quantization (BitsAndBytes).
- **from_pretrained()**: Loads the model with pre-trained weights and quantization configuration.
- **print_model_parameters(examples)**: Prints the number of trainable and total parameters of the model.
- **__call__(self, *args, **kwargs)**: The main method for running the generate tasks.
Usage
-----
To start generating QA, you should create an instance of the ``ModelManager`` class and call its ``__call__`` method, passing the necessary arguments.
.. code-block:: python
from questionnaire_mistral.models import ModelManager
model = ModelManager(model_name="path_to_model")
model(document=document, task=task, document_content=document_content, task_count=task_count)
License
-------
The project is distributed under the MIT License.
Metadata
Release files for questionnaire-mistral 3.1
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 |
|---|---|---|---|---|
| questionnaire_mistral-3.1.tar.gz | 9.4 kB | Without provenance | Details for questionnaire_mistral-3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| questionnaire_mistral-3.1-py3-none-any.whl | Python 3 | none | any | Details for questionnaire_mistral-3.1-py3-none-any.whl |
Total release size: 19.0 kB
Release files / questionnaire_mistral-3.1.tar.gz
| Download URL | questionnaire_mistral-3.1.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7a681a17bb83dbe8e4faae8232c3179614226ff76030861ce2c5ddf458d5599
|
|
BLAKE2b-256 checksum How to use checksums |
296a365fc60ea532448fa17dbe0ad3d370b3ba22ecda708e9047bcd6412126cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Release files / questionnaire_mistral-3.1-py3-none-any.whl
| Download URL | questionnaire_mistral-3.1-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
946e42b63053bdc0e6f070631addad81b0e42e78f011dc0072e24d24c22d1c04
|
|
BLAKE2b-256 checksum How to use checksums |
2137188cfc2c3b3523be5e6ecd2819cf8b30d53a5ba9a6d701edebccab819970
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Security for questionnaire-mistral 3.1
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.