jbochi commited on
Commit
3251ce4
1 Parent(s): 04265ed

Add a section explaining how to use the model

Browse files
Files changed (1) hide show
  1. README.md +32 -1
README.md CHANGED
@@ -37,7 +37,38 @@ widget:
37
 
38
  Quantized weights of [CoEdIT](https://github.com/vipulraheja/coedit) for inference with [candle](https://github.com/huggingface/candle/tree/main/candle-examples/examples/quantized-t5).
39
 
40
- Conversion command, using candle:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  ```shell
43
  cargo run --example tensor-tools --release -- quantize \
 
37
 
38
  Quantized weights of [CoEdIT](https://github.com/vipulraheja/coedit) for inference with [candle](https://github.com/huggingface/candle/tree/main/candle-examples/examples/quantized-t5).
39
 
40
+ ## Usage
41
+
42
+ Clone [candle](https://github.com/huggingface/candle), and run the `quantized-t5` example:
43
+
44
+ ```shell
45
+ $ cargo run --example quantized-t5 --release -- \
46
+ --model-id "jbochi/candle-coedit-quantized" \
47
+ --prompt "Make this text coherent: Their flight is weak. They run quickly through the tree canopy." \
48
+ --temperature 0
49
+ ...
50
+ Although their flight is weak, they run quickly through the tree canopy.
51
+ ```
52
+
53
+ By default, it will use CoEdIT-large (770M params, 643 MB).
54
+
55
+ To use CoEdIT-xl (3B params, 2.34 GB), specify the weight-file and config-file:
56
+
57
+ ```shell
58
+ $ cargo run --example quantized-t5 --release -- \
59
+ --model-id "jbochi/candle-coedit-quantized" \
60
+ --weight-file "model-xl.gguf" \
61
+ --config-file "config-xl.json" \
62
+ --prompt "Rewrite to make this easier to understand: Note that a storm surge is what forecasters consider a hurricane's most treacherous aspect." \
63
+ --temperature 0
64
+ ...
65
+ Note that a storm surge is what forecasters consider a hurricane's most dangerous part.
66
+ ```
67
+
68
+
69
+ ## Model generation
70
+
71
+ The weights were quantized using candle:
72
 
73
  ```shell
74
  cargo run --example tensor-tools --release -- quantize \