Draft: Templating, sampling and generation module
-
template_management.py
: wrapper aroundjinja2
to render templates checking if all necessary values are supplied -
generation.py
: wrapper aroundvllm
andopenai
to generate output based on prompts either in offline or server mode. Possible to use it in chat mode with a system prompt. Enum of AvailableModels -
sampling.py
: manage the sampling parameters -
utils.py
: retrieve model path from PEReN's cache, and compute cosine similarity between 2 texts -
prompt_template/
: folder with some preliminary templates - see
docs/generation.md
for full details