garak.generators.ggml
ggml generator support
This generator works with ggml models in gguf format like llama.cpp.
Put the path to your ggml executable (e.g. “/home/leon/llama.cpp/main”) in an environment variable named GGML_MAIN_PATH, and pass the path to the model you want to run either using –target_name on the command line or as the constructor parameter when instantiating LLaMaGgmlGenerator.
- Compatibility or other problems? Please let us know!
- class GgmlGenerator(name='', config_root=<module 'garak._config' from '/home/docs/checkouts/readthedocs.org/user_builds/garak/checkouts/stable/garak/_config.py'>)Source
Bases:
GeneratorGenerator interface for ggml models in gguf format.
Set the path to the model as the model name, and put the path to the ggml executable in environment variable GGML_MAIN_PATH.
Configurable parameters:
DEFAULT_PARAMScontents:max_tokens=150temperature=0.8top_k=40context_len=Noneskip_seq_start=Noneskip_seq_end=Nonerepeat_penalty=1.1presence_penalty=0.0frequency_penalty=0.0top_p=0.95exception_on_failure=Truefirst_call=Truekey_env_var='GGML_MAIN_PATH'extra_ggml_flags=['-no-cnv']extra_ggml_params={}
Default values are listed
See also Configuring garak for how to set these values.
Other attributes:
- generator_family_name = 'ggml'