Download wiki_model/prompts.py from Lucasgitguy-co/wiki-model-tiny: direct link, hf CLI and curl.
- Browser
- Download file 393 Bytes
-
https://huggingface.co/Lucasgitguy-co/wiki-model-tiny/resolve/main/wiki_model/prompts.py
- Command line
-
hf download hf://Lucasgitguy-co/wiki-model-tiny/wiki_model/prompts.py
-
curl -L -o prompts.py https://huggingface.co/Lucasgitguy-co/wiki-model-tiny/resolve/main/wiki_model/prompts.py
393 Bytes
| """Prompt format shared by both models and by training.""" | |
| CANT = "Can't verify from Wikipedia." | |
| def build(prompt, ctx=None): | |
| return (f"<ctx> {ctx} </ctx> " if ctx else "") + prompt | |
| def fact(topic, ctx=None): return build(f"<fact> {topic} </fact>", ctx) | |
| def question(q, ctx=None): return build(f"<q> {q} </q>", ctx) | |
| def fix(claim, ctx=None): return build(f"<fix> {claim} </fix>", ctx) | |