Ontocord.AI commited on
Commit
3a6a19a
1 Parent(s): c5e4b95

Upload modeling_mpt.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. modeling_mpt.py +2 -0
modeling_mpt.py CHANGED
@@ -1,4 +1,5 @@
1
  """A simple, flexible implementation of a GPT model.
 
2
  Inspired by https://github.com/karpathy/minGPT/blob/master/mingpt/model.py
3
  """
4
  import math
@@ -307,6 +308,7 @@ class MPTForCausalLM(MPTPreTrainedModel):
307
  @staticmethod
308
  def _reorder_cache(past_key_values, beam_idx):
309
  """Used by HuggingFace generate when using beam search with kv-caching.
 
310
  See https://github.com/huggingface/transformers/blob/3ec7a47664ebe40c40f4b722f6bb1cd30c3821ec/src/transformers/models/gpt2/modeling_gpt2.py#L1122-L1133
311
  for an example in transformers.
312
  """
 
1
  """A simple, flexible implementation of a GPT model.
2
+
3
  Inspired by https://github.com/karpathy/minGPT/blob/master/mingpt/model.py
4
  """
5
  import math
 
308
  @staticmethod
309
  def _reorder_cache(past_key_values, beam_idx):
310
  """Used by HuggingFace generate when using beam search with kv-caching.
311
+
312
  See https://github.com/huggingface/transformers/blob/3ec7a47664ebe40c40f4b722f6bb1cd30c3821ec/src/transformers/models/gpt2/modeling_gpt2.py#L1122-L1133
313
  for an example in transformers.
314
  """