Instructions to use lenamerkli/PolitScanner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use lenamerkli/PolitScanner with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -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 serve -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
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
- Atomic Chat
| language: | |
| - de | |
| license: mit | |
| base_model: unsloth/Qwen3-1.7B-unsloth-bnb-4bit | |
| library_name: gguf | |
| base_model_relation: finetune | |
| tags: | |
| - text-generation | |
| # PolitScanner | |
| ## 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](https://github.com/lenamerkli/PolitScanner). | |
| This is an entry for the Swiss AI Challenge 2025. | |
| More information can be found at [www.ki-challenge.ch](https://www.ki-challenge.ch/). | |
| ## Table of Contents | |
| 0. [Abstract](#abstract) | |
| 1. [Paper](#paper) | |
| 2. [Installation](#installation) | |
| 3. [Usage](#usage) | |
| 4. [License](#license) | |
| 5. [Citation](#citation) | |
| ## Paper | |
| Read the full paper [here](https://huggingface.co/lenamerkli/PolitScanner/blob/main/politscanner.pdf). | |
| ## 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](https://github.com/lenamerkli/PolitScanner/blob/main/README.md). | |
| ### Increase memlock | |
| Add (or update) the following lines to `/etc/security/limits.conf`: | |
| ```text | |
| * soft memlock 50331648 | |
| * hard memlock 50331648 | |
| ``` | |
| ### Git | |
| Install git: | |
| ```shell | |
| sudo dnf install git | |
| ``` | |
| Clone the PolitScanner repository: | |
| ```shell | |
| git clone https://huggingface.co/lenamerkli/PolitScanner | |
| cd PolitScanner | |
| ``` | |
| ### Python | |
| Install Python version 3.12.10 with the following command: | |
| ```shell | |
| sudo dnf install python3.12-0:3.12.10-1.fc41.x86_64 | |
| ``` | |
| Install the Python virtual environment package: | |
| ```shell | |
| sudo dnf install python3-virtualenv | |
| ``` | |
| Create the virtual environment: | |
| ```shell | |
| ./create_venv.sh | |
| ``` | |
| Activate the virtual environment: | |
| ```shell | |
| source .venv/bin/activate | |
| ``` | |
| ### llama.cpp | |
| If llama.cpp is not installed, check the [development readme](https://github.com/lenamerkli/PolitScanner/blob/main/README.md) for instructions. | |
| ### Download models | |
| Run the downloader: | |
| ```shell | |
| python3 download_ggufs.py | |
| ``` | |
| Move the PolitScanner model: | |
| ```shell | |
| 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: | |
| ```shell | |
| python3 main.py | |
| ``` | |
| The output will be written to the `output.txt` file. | |
| ## License | |
| [MIT License](https://github.com/lenamerkli/PolitScanner/blob/main/LICENSE) | |
| ## Citation | |
| bibtex: | |
| ```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: | |
| ```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} | |
| } | |
| ``` | |