cfahlgren1 HF staff commited on
Commit
fb756f9
·
1 Parent(s): 3ae54cc

update again

Browse files
Files changed (1) hide show
  1. src/snippets/alpaca_to_chatml.md +3 -3
src/snippets/alpaca_to_chatml.md CHANGED
@@ -15,7 +15,7 @@ code: |
15
  "from" := 'user',
16
  "value" := CASE
17
  WHEN input IS NOT NULL AND input != ''
18
- THEN instruction || '\n' || input
19
  ELSE instruction
20
  END
21
  ),
@@ -43,7 +43,7 @@ SELECT
43
  "from" := 'user',
44
  "value" := CASE
45
  WHEN input IS NOT NULL AND input != ''
46
- THEN instruction || '\n' || input
47
  ELSE instruction
48
  END
49
  ),
@@ -81,6 +81,6 @@ Differences between Alpaca and ChatML Conversation Format:
81
  height="560px"
82
  ></iframe>
83
 
84
- You can run this query through via the `sql_console` in the Hugging Face Hub [here](https://huggingface.co/datasets/yahma/alpaca-cleaned?row=16&sql_console=true&sql=--+Convert+Alpaca+format+to+Conversation+format%0AWITH+%0Asource_view+AS+%28%0A++SELECT+*+FROM+train++--+Change+%27train%27+to+your+desired+view+name+here%0A%29%0ASELECT+%0A++%5B%0A++++struct_pack%28%0A++++++%22from%22+%3A%3D+%27user%27%2C%0A++++++%22value%22+%3A%3D+CASE+%0A+++++++++++++++++++WHEN+input+IS+NOT+NULL+AND+input+%21%3D+%27%27+%0A+++++++++++++++++++THEN+instruction+%7C%7C+%27%5Cn%27+%7C%7C+input%0A+++++++++++++++++++ELSE+instruction%0A+++++++++++++++++END%0A++++%29%2C%0A++++struct_pack%28%0A++++++%22from%22+%3A%3D+%27assistant%27%2C%0A++++++%22value%22+%3A%3D+output%0A++++%29%0A++%5D+AS+conversation%0AFROM+source_view%0AWHERE+instruction+IS+NOT+NULL+%0A++AND+output+IS+NOT+NULL%3B).
85
 
86
  ![Alpaca to ChatML](./alpaca-to-conversation.png)
 
15
  "from" := 'user',
16
  "value" := CASE
17
  WHEN input IS NOT NULL AND input != ''
18
+ THEN instruction || '\n\n' || input
19
  ELSE instruction
20
  END
21
  ),
 
43
  "from" := 'user',
44
  "value" := CASE
45
  WHEN input IS NOT NULL AND input != ''
46
+ THEN instruction || '\n\n' || input
47
  ELSE instruction
48
  END
49
  ),
 
81
  height="560px"
82
  ></iframe>
83
 
84
+ You can run this query through via the `sql_console` in the Hugging Face Hub [here](https://huggingface.co/datasets/yahma/alpaca-cleaned?row=16&sql_console=true&sql=++++--+Convert+Alpaca+format+to+Conversation+format%0A++++WITH+%0A++++source_view+AS+%28%0A++++++SELECT+*+FROM+train++--+Change+%27train%27+to+your+desired+view+name+here%0A++++%29%0A++++SELECT+%0A++++++%5B%0A++++++++struct_pack%28%0A++++++++++%22from%22+%3A%3D+%27user%27%2C%0A++++++++++%22value%22+%3A%3D+CASE+%0A++++++++++++++++++++++WHEN+input+IS+NOT+NULL+AND+input+%21%3D+%27%27+%0A++++++++++++++++++++++THEN+instruction+%7C%7C+%27%5Cn%5Cn%27+%7C%7C+input%0A++++++++++++++++++++++ELSE+instruction%0A++++++++++++++++++++END%0A++++++++%29%2C%0A++++++++struct_pack%28%0A++++++++++%22from%22+%3A%3D+%27assistant%27%2C%0A++++++++++%22value%22+%3A%3D+output%0A++++++++%29%0A++++++%5D+AS+conversation%0A++++FROM+source_view%0A++++WHERE+instruction+IS+NOT+NULL+%0A++++++AND+output+IS+NOT+NULL%3B).
85
 
86
  ![Alpaca to ChatML](./alpaca-to-conversation.png)