Text Generation
Transformers
PyTorch
tinymixtral
conversational
custom_code
mikecovlee commited on
Commit
8e4470a
·
verified ·
1 Parent(s): d610f5c

Upload post-trained checkpoint

Browse files
Files changed (2) hide show
  1. modeling_tinymixtral.py +1 -1
  2. pytorch_model.bin +1 -1
modeling_tinymixtral.py CHANGED
@@ -230,7 +230,7 @@ class TinyMixtralForCausalLM(PreTrainedModel):
230
  labels.reshape(-1),
231
  ignore_index=-100,
232
  )
233
- loss = loss + self.config.router_aux_loss_coef * total_aux
234
 
235
  if not return_dict:
236
  return (loss, logits) if loss is not None else (logits,)
 
230
  labels.reshape(-1),
231
  ignore_index=-100,
232
  )
233
+ loss = loss + self.config.router_aux_loss_coef * (total_aux / len(self.layers))
234
 
235
  if not return_dict:
236
  return (loss, logits) if loss is not None else (logits,)
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ad3e467d0a029b27fc6e13c44d1e36ac1552cc183996aae04161215c47876864
3
  size 1729603131
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f0593c48a833544b0dbeec1381e73c1e484fef75be688aee724e124dd200a74
3
  size 1729603131