Felladrin commited on
Commit
471bad6
1 Parent(s): a9832f4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -0
README.md CHANGED
@@ -1,3 +1,41 @@
1
  ---
2
  license: bigscience-bloom-rail-1.0
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: bigscience-bloom-rail-1.0
3
+ datasets:
4
+ - ehartford/wizard_vicuna_70k_unfiltered
5
+ - shahules786/orca-chat
6
+ - timdettmers/openassistant-guanaco
7
+ - laion/OIG
8
+ language:
9
+ - fr
10
+ - en
11
+ library_name: "transformers.js"
12
+ base_model: cmarkea/bloomz-560m-sft-chat
13
  ---
14
+
15
+ INT8 ONNX version of [cmarkea/bloomz-560m-sft-chat](https://huggingface.co/cmarkea/bloomz-560m-sft-chat) to use with [Transformers.js](https://huggingface.co/docs/transformers.js).
16
+
17
+ ### Example usage
18
+ #### Pipeline API
19
+ ```js
20
+ import { pipeline } from '@xenova/transformers';
21
+
22
+ const generator = await pipeline('text-generation', 'Felladrin/onnx-bloomz-560m-sft-chat');
23
+ const output = await generator('</s>What is the first world war?<s>', { add_special_tokens: true, max_new_tokens: 128, repetition_penalty: 1.2});
24
+ console.log(output); // The first world war was a conflict between the United States and the Soviet Union. The conflict began in World War II and lasted until the end of World War III.
25
+ ```
26
+
27
+ #### Auto Classes
28
+ ```js
29
+ import { AutoModelForCausalLM, AutoTokenizer } from '@xenova/transformers';
30
+
31
+ const model_path = 'Felladrin/onnx-bloomz-560m-sft-chat';
32
+ const model = await AutoModelForCausalLM.from_pretrained(model_path);
33
+ const tokenizer = await AutoTokenizer.from_pretrained(model_path);
34
+
35
+ const prompt = '</s>What is the first world war?<s>';
36
+ const { input_ids } = tokenizer(prompt);
37
+ const tokens = await model.generate(input_ids, { max_new_tokens: 128, repetition_penalty: 1.2});
38
+ console.log(tokenizer.decode(tokens[0], { skip_special_tokens: true }));
39
+ // The first world war was a conflict between the United States and the Soviet Union. The conflict began in World War II and lasted until the end of World War III.
40
+ ```
41
+