suarkadipa commited on
Commit
b06a6b3
·
1 Parent(s): 7d25f51

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -2
README.md CHANGED
@@ -14,7 +14,7 @@ probably proofread and complete it, then remove this comment. -->
14
 
15
  # suarkadipa/GPT-2-finetuned-papers
16
 
17
- This model is a fine-tuned version of [distilgpt2](https://huggingface.co/distilgpt2) on an CShorten/ML-ArXiv-Papers dataset.
18
  It achieves the following results on the evaluation set:
19
  - Train Loss: 2.4225
20
  - Validation Loss: 2.2164
@@ -26,11 +26,12 @@ More information needed
26
 
27
  ## Intended uses & limitations
28
 
29
- How to run in Google Colab
30
 
31
  from transformers import AutoTokenizer, AutoModelForCausalLM
32
 
33
  tokenizer_fromhub = AutoTokenizer.from_pretrained("suarkadipa/GPT-2-finetuned-papers")
 
34
  model_fromhub = AutoModelForCausalLM.from_pretrained("suarkadipa/GPT-2-finetuned-papers", from_tf=True)
35
 
36
  text_generator = pipeline(
@@ -44,7 +45,9 @@ text_generator = pipeline(
44
  // change with your text
45
 
46
  test_sentence = "the role of recommender systems"
 
47
  res=text_generator(test_sentence)[0]["generated_text"].replace("\n", " ")
 
48
  res
49
 
50
  ## Training and evaluation data
 
14
 
15
  # suarkadipa/GPT-2-finetuned-papers
16
 
17
+ This model is a fine-tuned version of [distilgpt2](https://huggingface.co/distilgpt2) on an CShorten/ML-ArXiv-Papers dataset. Based on https://python.plainenglish.io/i-fine-tuned-gpt-2-on-100k-scientific-papers-heres-the-result-903f0784fe65
18
  It achieves the following results on the evaluation set:
19
  - Train Loss: 2.4225
20
  - Validation Loss: 2.2164
 
26
 
27
  ## Intended uses & limitations
28
 
29
+ # How to run in Google Colab
30
 
31
  from transformers import AutoTokenizer, AutoModelForCausalLM
32
 
33
  tokenizer_fromhub = AutoTokenizer.from_pretrained("suarkadipa/GPT-2-finetuned-papers")
34
+
35
  model_fromhub = AutoModelForCausalLM.from_pretrained("suarkadipa/GPT-2-finetuned-papers", from_tf=True)
36
 
37
  text_generator = pipeline(
 
45
  // change with your text
46
 
47
  test_sentence = "the role of recommender systems"
48
+
49
  res=text_generator(test_sentence)[0]["generated_text"].replace("\n", " ")
50
+
51
  res
52
 
53
  ## Training and evaluation data