garak.generators.ollama
Ollama interface
- class OllamaGenerator(name='', config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/stable/garak/_config.py'>)Source
Bases:
GeneratorInterface for Ollama endpoints
Model names can be passed in short form like “llama2” or specific versions or sizes like “gemma:7b” or “llama2:latest”
Configurable parameters:
DEFAULT_PARAMScontents:max_tokens=150temperature=Nonetop_k=Nonecontext_len=Noneskip_seq_start=Noneskip_seq_end=Nonetimeout=30host='127.0.0.1:11434'
Default values are listed
See also Configuring garak for how to set these values.
Other attributes:
- active = True
- extra_dependency_names = ['ollama']
- generator_family_name = 'Ollama'
- parallel_capable = False
- class OllamaGeneratorChat(name='', config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/stable/garak/_config.py'>)Source
Bases:
OllamaGeneratorInterface for Ollama endpoints, using the chat functionality
Model names can be passed in short form like “llama2” or specific versions or sizes like “gemma:7b” or “llama2:latest”