78 lines
3.2 KiB
Markdown
78 lines
3.2 KiB
Markdown
# VeraMind
|
|
|
|
**VeraMind** is a fine-tuned machine learning model designed to predict whether a news article is real or fake. Built using the Hugging Face Transformers library and PyTorch, the `VeraMind` model suite is optimized for binary text classification tasks.
|
|
|
|
|
|
## Features
|
|
|
|
- **Real or Fake Prediction**: Classifies news articles as "REAL" or "FAKE."
|
|
- **Confidence Score**: Provides a numerical confidence score for each prediction.
|
|
- **Fine-Tuned Model**: Uses `VeraMind-Edge`, a fine-tuned version of [fabelous-albert-uncased](https://gitea.fabelous.app/Fabel/Fabelous-albert-uncased), for robust and reliable predictions. `VeraMind-Mini` is based on [DistilBERT](https://huggingface.co/distilbert/distilbert-base-multilingual-cased) and optimized for server-side usage.
|
|
|
|
|
|
## Model Variants
|
|
|
|
- **VeraMind-Mini**: Optimized for server-side usage, offering robust performance and efficiency for large-scale operations. Based on DistilBERT architecture.
|
|
- **VeraMind-Edge**: Designed for client-side usage, offering a lightweight and resource-efficient solution for local inference. Based on fabelous-albert-uncased architecture.
|
|
|
|
|
|
## Downloading the Model
|
|
|
|
You can download the `VeraMind` models from the following links:
|
|
|
|
- [Download VeraMind-Mini (Server-Side)](https://gitea.fabelous.app/Fabel/VeraMind/releases/download/0.1/VeraMind-Mini.zip)
|
|
- [Download VeraMind-Edge (Client-Side)](https://gitea.fabelous.app/Fabel/VeraMind/releases/download/0.1.1/VeraMind-Edge.zip)
|
|
|
|
|
|
## Usage Example
|
|
|
|
The example below demonstrates how to use the `VeraMindInference` class to evaluate the authenticity of a news article:
|
|
|
|
```python
|
|
from src.Inference import VeraMindInference
|
|
|
|
# Load the model
|
|
model = VeraMindInference("VeraMind-Edge") # Use VeraMind-Mini for server-side usage
|
|
|
|
# Example news article text
|
|
text = "This is an example News Article"
|
|
|
|
# Predict if the news is real or fake
|
|
result = model.predict(text)
|
|
|
|
print(result)
|
|
```
|
|
|
|
Output:
|
|
|
|
```python
|
|
{'result': 'FAKE', 'confidence': 0.9990140199661255}
|
|
```
|
|
|
|
|
|
## Changelog
|
|
|
|
### Current Version
|
|
- **Model Architecture**: Switched from DistilBERT to ALBERT architecture for VeraMind-Edge.
|
|
- **Memory Usage**: Reduced memory usage to approximately 10% of the previous version.
|
|
- **Inference Speed**: Slightly slower inference speed due to architectural changes.
|
|
|
|
### Previous Version
|
|
- Used DistilBERT architecture with higher memory requirements and faster inference speed.
|
|
|
|
|
|
## Disclaimer
|
|
|
|
This project is provided "as-is" without any warranties. While the model strives for accuracy, it may make mistakes. Always verify predictions by consulting multiple reliable sources. Use this tool responsibly.
|
|
|
|
|
|
## License
|
|
|
|
This project is licensed under the [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)](https://creativecommons.org/licenses/by-nc-nd/4.0/). You may use and share this software privately, but must credit the authors, refrain from commercial use, and avoid creating derivative works.
|
|
|
|
|
|
## Feedback and Support
|
|
|
|
If you encounter any issues or have questions, feel free to reach out through the project's [Gitea Issues page](https://gitea.fabelous.app/Fabel/Fabelous-albert-uncased/issues) or contact our support team at support@fabelous.app.
|
|
|