JunxiongWang commited on
Commit
69cd014
1 Parent(s): ad209a9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -6
README.md CHANGED
@@ -28,16 +28,11 @@ text = "The goal of life is [MASK]."
28
  encoded_input = tokenizer(text, return_tensors='np', padding='max_length', max_length=4096)
29
  output = model(**encoded_input)
30
  tokenizer.convert_ids_to_tokens(jnp.flip(jnp.argsort(jax.nn.softmax(output.logits[encoded_input['input_ids']==103]))[0])[:10])
31
- # output: ['happiness', 'love', 'peace', 'perfection', 'life', 'enlightenment', 'god', 'survival', 'freedom', 'good']
32
- jnp.flip(jnp.sort(jax.nn.softmax(output.logits[encoded_input['input_ids']==103]))[0])[:10]
33
- # probability: [0.16052087, 0.04306792, 0.03651363, 0.03468223, 0.02927081, 0.02549769, 0.02385132, 0.02261189, 0.01672831, 0.01619471]
34
  text = "Paris is the [MASK] of France."
35
  encoded_input = tokenizer(text, return_tensors='np', padding='max_length', max_length=4096)
36
  output = model(**encoded_input)
37
  tokenizer.convert_ids_to_tokens(jnp.flip(jnp.argsort(jax.nn.softmax(output.logits[encoded_input['input_ids']==103]))[0])[:10])
38
- # output: ['capital', 'centre', 'center', 'city', 'capitol', 'prefecture', 'headquarters', 'president', 'metropolis', 'heart']
39
- jnp.flip(jnp.sort(jax.nn.softmax(output.logits[encoded_input['input_ids']==103]))[0])[:10]
40
- # probability: [0.9981787 , 0.00034076, 0.00026992, 0.00026926, 0.00017787, 0.00004816, 0.00004256, 0.00003716, 0.00003634, 0.00002893]
41
  ```
42
 
43
  ### Load Sequence Classification Model
 
28
  encoded_input = tokenizer(text, return_tensors='np', padding='max_length', max_length=4096)
29
  output = model(**encoded_input)
30
  tokenizer.convert_ids_to_tokens(jnp.flip(jnp.argsort(jax.nn.softmax(output.logits[encoded_input['input_ids']==103]))[0])[:10])
31
+
 
 
32
  text = "Paris is the [MASK] of France."
33
  encoded_input = tokenizer(text, return_tensors='np', padding='max_length', max_length=4096)
34
  output = model(**encoded_input)
35
  tokenizer.convert_ids_to_tokens(jnp.flip(jnp.argsort(jax.nn.softmax(output.logits[encoded_input['input_ids']==103]))[0])[:10])
 
 
 
36
  ```
37
 
38
  ### Load Sequence Classification Model