falcon_180b.jinja 558 B

1234567891011121314151617
  1. {%- for message in messages -%}
  2. {%- if message['role'] == 'system' -%}
  3. {{- 'System: ' + message['content'] -}}
  4. {%- elif message['role'] == 'user' -%}
  5. {{- 'User: ' + message['content'] -}}
  6. {%- elif message['role'] == 'assistant' -%}
  7. {{- 'Falcon: ' + message['content'] -}}
  8. {%- endif -%}
  9. {%- if (loop.last and add_generation_prompt) or not loop.last -%}
  10. {{- '\n' -}}
  11. {%- endif -%}
  12. {%- endfor -%}
  13. {%- if add_generation_prompt and messages[-1]['role'] != 'assistant' -%}
  14. {{- 'Falcon:' -}}
  15. {% endif %}