Skip to content

Draft: Templating, sampling and generation module

Benoît MARION requested to merge synthetic_gen into main
  • template_management.py: wrapper around jinja2 to render templates checking if all necessary values are supplied
  • generation.py: wrapper around vllm and openai 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

Merge request reports

Loading