Lagstill commited on
Commit
b3e16f5
1 Parent(s): 7453d8b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -41
README.md CHANGED
@@ -41,44 +41,3 @@ You can use this model for Tamil text generation:
41
  >>> print(tokenizer.decode(beam_output[0], skip_special_tokens=True))
42
  ```
43
  ---
44
- license: bigscience-bloom-rail-1.0
45
-
46
- widget :
47
- - text: "ആധുനിക ഭാരതം കണ്ട "
48
- example_title: "ആധുനിക ഭാരതം"
49
- - text : "മലയാളഭാഷ എഴുതുന്നതിനായി"
50
- example_title: "മലയാളഭാഷ എഴുതുന്നതിനായി"
51
- - text : "ഇന്ത്യയിൽ കേരള സംസ്ഥാനത്തിലും"
52
- example_title : "ഇന്ത്യയിൽ കേരള"
53
- ---
54
- # GPT2-Tamil
55
-
56
- ## Model description
57
- GPT2-Malayalam is a GPT-2 transformer model fine Tuned on a large corpus of Malayalam data in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labelling them in any way with an automatic process to generate inputs and labels from those texts. More precisely, it was trained to guess the next word in sentences.
58
-
59
- More precisely, inputs are sequences of continuous text of a certain length and the targets are the same sequence, shifted one token (word or piece of word) to the right. The model uses internally a mask-mechanism to make sure the predictions for the token i only uses the inputs from 1 to i but not the future tokens.
60
-
61
- This way, the model learns an inner representation of the Malayalam language that can then be used to extract features useful for downstream tasks.
62
- ## Intended uses & limitations
63
-
64
- You can use the raw model for text generation or fine-tune it to a downstream task. See the
65
- [model hub](https://huggingface.co/models?filter=gpt2) to look for fine-tuned versions on a task that interests you.
66
-
67
- ## Usage
68
- You can use this model for Malayalam text generation:
69
- ```python
70
- >>> from transformers import TFGPT2LMHeadModel, GPT2Tokenizer
71
- >>> tokenizer = GPT2Tokenizer.from_pretrained("Lagstill/GPT-2-Tamil")
72
- >>> model = TFGPT2LMHeadModel.from_pretrained("Lagstill/GPT-2-Tamil")
73
- >>> text = "விக்கிப்பீடியா"
74
- >>> encoded_text = tokenizer.encode(text, return_tensors='tf')
75
- >>> beam_output = model.generate(
76
- encoded_text,
77
- max_length=100,
78
- num_beams=5,
79
- temperature=0.7,
80
- no_repeat_ngram_size=2,
81
- num_return_sequences=5
82
- )
83
- >>> print(tokenizer.decode(beam_output[0], skip_special_tokens=True))
84
- ```
 
41
  >>> print(tokenizer.decode(beam_output[0], skip_special_tokens=True))
42
  ```
43
  ---