Instructions to use lenamerkli/PolitScanner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use lenamerkli/PolitScanner with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="lenamerkli/PolitScanner", filename="Qwen3-1.7B-PolitScanner-Q5_K_S.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use lenamerkli/PolitScanner with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf lenamerkli/PolitScanner:Q5_K_S # Run inference directly in the terminal: llama-cli -hf lenamerkli/PolitScanner:Q5_K_S
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf lenamerkli/PolitScanner:Q5_K_S # Run inference directly in the terminal: llama-cli -hf lenamerkli/PolitScanner:Q5_K_S
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf lenamerkli/PolitScanner:Q5_K_S # Run inference directly in the terminal: ./llama-cli -hf lenamerkli/PolitScanner:Q5_K_S
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf lenamerkli/PolitScanner:Q5_K_S # Run inference directly in the terminal: ./build/bin/llama-cli -hf lenamerkli/PolitScanner:Q5_K_S
Use Docker
docker model run hf.co/lenamerkli/PolitScanner:Q5_K_S
- LM Studio
- Jan
- vLLM
How to use lenamerkli/PolitScanner with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lenamerkli/PolitScanner" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lenamerkli/PolitScanner", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lenamerkli/PolitScanner:Q5_K_S
- Ollama
How to use lenamerkli/PolitScanner with Ollama:
ollama run hf.co/lenamerkli/PolitScanner:Q5_K_S
- Unsloth Studio new
How to use lenamerkli/PolitScanner with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lenamerkli/PolitScanner to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lenamerkli/PolitScanner to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for lenamerkli/PolitScanner to start chatting
- Docker Model Runner
How to use lenamerkli/PolitScanner with Docker Model Runner:
docker model run hf.co/lenamerkli/PolitScanner:Q5_K_S
- Lemonade
How to use lenamerkli/PolitScanner with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lenamerkli/PolitScanner:Q5_K_S
Run and chat with the model
lemonade run user.PolitScanner-Q5_K_S
List all available models
lemonade list
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex
# Run unsloth studio
unsloth studio -H 0.0.0.0 -p 8888
# Then open http://localhost:8888 in your browser
# Search for lenamerkli/PolitScanner to start chattingUsing HuggingFace Spaces for Unsloth
# No setup required# Open https://huggingface.co/spaces/unsloth/studio in your browser
# Search for lenamerkli/PolitScanner to start chattingPolitScanner
Abstract
Swiss politicians lie. And they mostly get away with it. "One reason for this is that fact-checks, which can only be carried out retrospectively, are surprisingly ineffective. Listeners still remember the false information. The correction is forgotten." โ Philipp Gerlach. This technical report provides a comprehensive overview of the artificial intelligence components of the PolitScanner project. It aims to automatically detect false narratives and fake news in the speeches of Swiss politicians while avoiding the inaccuracies inherent in Large Language Models.
The training code can be found on GitHub.
This is an entry for the Swiss AI Challenge 2025. More information can be found at www.ki-challenge.ch.
Table of Contents
Paper
Read the full paper here.
Installation
Note: inference only
This installation guide is for Nobara Linux. Other distributions should work as well.
For the full installation guide, see the development readme.
Increase memlock
Add (or update) the following lines to /etc/security/limits.conf:
* soft memlock 50331648
* hard memlock 50331648
Git
Install git:
sudo dnf install git
Clone the PolitScanner repository:
git clone https://huggingface.co/lenamerkli/PolitScanner
cd PolitScanner
Python
Install Python version 3.12.10 with the following command:
sudo dnf install python3.12-0:3.12.10-1.fc41.x86_64
Install the Python virtual environment package:
sudo dnf install python3-virtualenv
Create the virtual environment:
./create_venv.sh
Activate the virtual environment:
source .venv/bin/activate
llama.cpp
If llama.cpp is not installed, check the development readme for instructions.
Download models
Run the downloader:
python3 download_ggufs.py
Move the PolitScanner model:
mv ./Qwen3-1.7B-PolitScanner-Q5_K_S.gguf /opt/llms/Qwen3-1.7B-PolitScanner-Q5_K_S.gguf
Usage
Copy the political speech (preferably in swiss high german) to the input.txt file.
Run the program:
python3 main.py
The output will be written to the output.txt file.
License
Citation
bibtex:
@misc{merkli2025politscanner,
title = {PolitScanner: Automatic Detection of common Incorrect Statements in Speeches of Swiss Politicians},
author = {Lena Merkli},
year = {2025},
month = {07},
url = {https://huggingface.co/lenamerkli/PolitScanner}
}
biblatex:
@online{merkli2025politscanner,
title = {PolitScanner: Automatic Detection of common Incorrect Statements in Speeches of Swiss Politicians},
author = {Lena Merkli},
year = {2025},
month = {07},
url = {https://huggingface.co/lenamerkli/PolitScanner}
}
- Downloads last month
- 1
5-bit
Model tree for lenamerkli/PolitScanner
Base model
Qwen/Qwen3-1.7B-Base
Install Unsloth Studio (macOS, Linux, WSL)
# Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for lenamerkli/PolitScanner to start chatting