samkeet commited on
Commit
2582b26
·
verified ·
1 Parent(s): 759b981

Upload GPT124MTextGenerationPipeline

Browse files
Files changed (2) hide show
  1. config.json +15 -0
  2. pipeline_gpt.py +1 -1
config.json CHANGED
@@ -7,6 +7,21 @@
7
  "AutoModelForCausalLM": "modeling_gpt.GPTModelForTextGeneration"
8
  },
9
  "block_size": 1024,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  "model_type": "custom_gpt",
11
  "n_embd": 768,
12
  "n_head": 12,
 
7
  "AutoModelForCausalLM": "modeling_gpt.GPTModelForTextGeneration"
8
  },
9
  "block_size": 1024,
10
+ "custom_pipelines": {
11
+ "text-generation": {
12
+ "default": {
13
+ "model": {
14
+ "pt": "samkeet/GPT_124M"
15
+ }
16
+ },
17
+ "impl": "pipeline_gpt.GPT124MTextGenerationPipeline",
18
+ "pt": [
19
+ "AutoModelForCausalLM"
20
+ ],
21
+ "tf": [],
22
+ "type": "text"
23
+ }
24
+ },
25
  "model_type": "custom_gpt",
26
  "n_embd": 768,
27
  "n_head": 12,
pipeline_gpt.py CHANGED
@@ -54,5 +54,5 @@ class GPT124MTextGenerationPipeline(Pipeline):
54
  """
55
  Decodes token ID into human-readable text using the tokenizer.
56
  """
57
- print(model_output)
58
  return self.tokenizer.decode(model_output)
 
54
  """
55
  Decodes token ID into human-readable text using the tokenizer.
56
  """
57
+
58
  return self.tokenizer.decode(model_output)