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
| def split_list(array: list[str], separator: str) -> list[str]: | |
| r = [] | |
| placeholder = "\uE000" | |
| for s in array: | |
| s_with_marker = s.replace(separator, separator + placeholder) | |
| parts = s_with_marker.split(placeholder) | |
| r.extend(parts) | |
| return r | |
| def split(text: str) -> list[str]: | |
| for replacement in [' \n', '\n ', '\n\n']: | |
| while replacement in text: | |
| text = text.replace(replacement, '\n') | |
| protections = ['d. h.', 'Abs.', 'Art.', 'Bem.', 'Bst.', ' ff.', ' f.', '(ff.', '(f.', 'insbes.', 'S.', 'V.'] | |
| for protection in protections: | |
| text = text.replace(protection, protection.replace('.', '\uE000')) | |
| placeholder = "\uE001" | |
| for i in range(3, len(text) - 3): | |
| if text[i] == '.': | |
| if ( | |
| (text[i - 2] == ' ') or | |
| ( not text[i + 2].isupper()) or | |
| (text[i - 1].isdigit()) | |
| ): | |
| text = text[:i] + placeholder + text[i+1:] | |
| array = [text] | |
| for value in ['\n', '. ', '? ']: | |
| array = split_list(array, value) | |
| final_list = [] | |
| for s in array: | |
| cleaned_s = s.replace(placeholder, '.').strip() | |
| final_list.append(cleaned_s) | |
| return final_list | |