Instructions to use ArthurZ/clef-flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ArthurZ/clef-flash with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ArthurZ/clef-flash", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download decision_template.jinja from ArthurZ/clef-flash: direct link, hf CLI and curl.
- Browser
- Download file 1.58 kB
-
https://huggingface.co/ArthurZ/clef-flash/resolve/main/decision_template.jinja
- Command line
-
hf download hf://ArthurZ/clef-flash/decision_template.jinja
-
curl -L -o decision_template.jinja https://huggingface.co/ArthurZ/clef-flash/resolve/main/decision_template.jinja
1.58 kB
| {#- Cloudflare/clef, clef-flash (joint_schema_model.encode_record): ONE sequence per request. | |
| Every text piece the original tokenizes on its own sits between sentinels; <|mark|> pairs give the spans the joint head | |
| pools: per question (instruction start, end) then (option start, end) for each option in question.options order | |
| (decision_config: noul_options = ["true", "false"], sort_choices = true). -#} | |
| {%- macro r(x) %}{{ x if x is string else x|tojson(sort_keys=true, separators=(",", ":")) }}{% endmacro -%} | |
| {{- "<|im_start|>system\nRead the complete state and schema. Decide every field jointly. Each answer must be exactly one of that field's allowed options.<|im_end|>\n<|im_start|>user\nSTATE:\n<|split|>" ~ r(state) ~ "<|split|>\n\nSCHEMA FIELDS:\n" -}} | |
| {%- for q in questions -%} | |
| {{- "<|split|>\nFIELD " ~ loop.index ~ "\nID: " ~ q.name ~ "\nTYPE: " ~ q.type ~ "\nINSTRUCTION: <|mark|>" ~ r(q.name if q.instructions is none or q.instructions == "" else q.instructions) ~ "<|mark|>\nALLOWED OPTIONS:\n" -}} | |
| {%- for key in q.options -%} | |
| {%- set d = q.descriptions[loop.index0] -%} | |
| {%- if q.type == "noul" and d is none %}{% set d = {"true": "The proposition is true or the answer is yes.", "false": "The proposition is false or the answer is no."}[key] %}{% endif -%} | |
| {{- "OPTION " ~ loop.index ~ ": <|mark|>" ~ r({"option_id": key} if d is none else {"option_id": key, "description": d}) ~ "<|mark|>\n" -}} | |
| {%- endfor -%} | |
| {{- "END FIELD\n" -}} | |
| {%- endfor -%} | |
| {{- "<|split|>\n<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\nJOINT SCHEMA DECISIONS:" -}} | |