radames commited on
Commit
d787142
1 Parent(s): a153996

Upload utils.js

Browse files
Files changed (1) hide show
  1. utils.js +35 -1
utils.js CHANGED
@@ -65,6 +65,7 @@ export async function generateText(
65
  worker.addEventListener("message", messageHandler);
66
  });
67
  }
 
68
  export const MODELS = {
69
  t5_small_quantized: {
70
  size: "64.4 MB",
@@ -133,7 +134,6 @@ export const MODELS = {
133
  summarization: { prefix: "summarize: ", max_length: 200 },
134
  },
135
  },
136
-
137
  flan_t5_base_quantized: {
138
  size: "263 MB",
139
  base_url: "https://huggingface.co/lmz/candle-quantized-t5/resolve/main/",
@@ -156,7 +156,41 @@ export const MODELS = {
156
  summarization: { prefix: "summarize: ", max_length: 200 },
157
  },
158
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  };
 
160
  export function getModelInfo(id, taskID) {
161
  const model = MODELS[id];
162
  return {
 
65
  worker.addEventListener("message", messageHandler);
66
  });
67
  }
68
+
69
  export const MODELS = {
70
  t5_small_quantized: {
71
  size: "64.4 MB",
 
134
  summarization: { prefix: "summarize: ", max_length: 200 },
135
  },
136
  },
 
137
  flan_t5_base_quantized: {
138
  size: "263 MB",
139
  base_url: "https://huggingface.co/lmz/candle-quantized-t5/resolve/main/",
 
156
  summarization: { prefix: "summarize: ", max_length: 200 },
157
  },
158
  },
159
+ coedit_large_quantized: {
160
+ size: "643 MB",
161
+ base_url: "https://huggingface.co/jbochi/candle-coedit-quantized/resolve/main/",
162
+ model: "model.gguf",
163
+ tokenizer: "tokenizer.json",
164
+ config: "config.json",
165
+ tasks: {
166
+ fluency: {
167
+ prefix: "Fix the grammar: ",
168
+ max_length: 300,
169
+ },
170
+ coherence: {
171
+ prefix: "Rewrite to make this easier to understand: ",
172
+ max_length: 300,
173
+ },
174
+ simplification: {
175
+ prefix: "translate English to Romanian: ",
176
+ max_length: 300,
177
+ },
178
+ simplification: {
179
+ prefix: "Paraphrase this: ",
180
+ max_length: 300,
181
+ },
182
+ formalization: {
183
+ prefix: "Write this more formally: ",
184
+ max_length: 300,
185
+ },
186
+ neutralize: {
187
+ prefix: "Write in a more neutral way: ",
188
+ max_length: 300,
189
+ },
190
+ },
191
+ },
192
  };
193
+
194
  export function getModelInfo(id, taskID) {
195
  const model = MODELS[id];
196
  return {