lukestanley commited on
Commit
c862ef3
1 Parent(s): ae968ca

Add example and small tweaks

Browse files
Files changed (1) hide show
  1. README.md +26 -2
README.md CHANGED
@@ -9,14 +9,38 @@ pinned: false
9
  # ❄️ ChillTranslator 🤬 ➡️ 😎💬
10
  ## Overview
11
 
12
- ChillTranslator uses Microsoft's Phi 2 as the base model. It's been fine-tuned on a dataset made up of calm versions of internet comments. These comments follow a specific syntax aimed at maintaining constructive conversation without losing the essence of the original comments.
13
 
14
  ## Intent
15
 
16
- The project is a step into researching how we can use AI to tone down heated online comments that are worth discussing, steering clear of pure hate speech. It's an exploration into creating tools that could help make online discussions more constructive.
17
 
18
  ## Model Details
19
 
20
  - **Base Model**: Microsoft Phi 2, chosen for its efficiency and capability in language understanding and generation.
21
  - **Fine-tuning**: Performed on a curated dataset designed to encourage more respectful and thoughtful online interactions.
22
  - **File Info**: The model file `ChillTranslator_Q4_K_M.gguf` is under 2 GB and works with `llama.cpp`. It’s meant to run with a grammar file, producing JSON objects to ensure it generates only the requested output.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  # ❄️ ChillTranslator 🤬 ➡️ 😎💬
10
  ## Overview
11
 
12
+ ChillTranslator uses Microsoft's Phi 2 as the base model. It's been fine-tuned on a dataset made up of calm versions of internet comments. These comments are meant to be output as JSON with a grammar specified.
13
 
14
  ## Intent
15
 
16
+ The project is an experiment in how we can use AI to tone down heated online comments that are worth discussing, steering clear of pure hate speech (not much can be done for that, I suppose). It's an exploration into creating tools that could help make online discussions more constructive.
17
 
18
  ## Model Details
19
 
20
  - **Base Model**: Microsoft Phi 2, chosen for its efficiency and capability in language understanding and generation.
21
  - **Fine-tuning**: Performed on a curated dataset designed to encourage more respectful and thoughtful online interactions.
22
  - **File Info**: The model file `ChillTranslator_Q4_K_M.gguf` is under 2 GB and works with `llama.cpp`. It’s meant to run with a grammar file, producing JSON objects to ensure it generates only the requested output.
23
+
24
+ ## Example Usage
25
+
26
+ This is an example of how to run `ChillTranslator` with the necessary options:
27
+
28
+ ```bash
29
+ llama.cpp/main -m ChillTranslator_Q4_K_M.gguf --interactive-first --grammar-file ChillTranslator.grammar
30
+ ```
31
+
32
+ And here's a snippet of a llama.cpp grammar` file that makes it produce more predictable output:
33
+
34
+ ```plaintext
35
+ root ::= TextRevision
36
+ BetterTerm ::= "{" ws "\"old\":" ws string "," ws "\"new\":" ws stringlist "}"
37
+ BetterTermlist ::= "[]" | "[" ws BetterTerm ("," ws BetterTerm)* "]"
38
+ TextRevision ::= "{" ws "\"better_terms\":" ws BetterTermlist "," ws "\"minimal_fix\":" ws string "," ws "\"nvc_perspective\":" ws string "," ws "\"constructive\":" ws string "," ws "\"hybrid\":" ws string "," ws "\"final\":" ws string ws "}"
39
+ TextRevisionlist ::= "[]" | "[" ws TextRevision ("," ws TextRevision)* "]"
40
+ string ::= "\"" ([^"]*) "\""
41
+ boolean ::= "true" | "false"
42
+ ws ::= [ \t\n]*
43
+ number ::= [0-9]+ "."? [0-9]*
44
+ stringlist ::= "[" ws "]" | "[" ws string ("," ws string)* ws "]"
45
+ numberlist ::= "[" ws "]" | "[" ws number ("," ws number)* ws "]"
46
+ ```