CoolFace
Modelpublic

mhhmm/typescript-instruct-20k-v2

sourceHugging Facellama2updated 3y agoView on Hugging Face
2likes6downloads
Model Card

Architecture

The Architecture

About

This model is a fine-tuned version of codellama/CodeLlama-13b-hf. It achieves the following results on the evaluation set:

  • Loss: 0.4268

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 0.0002
  • trainbatchsize: 8
  • evalbatchsize: 8
  • seed: 42
  • distributed_type: multi-GPU
  • num_devices: 2
  • totaltrainbatch_size: 16
  • totalevalbatch_size: 16
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lrschedulertype: cosine
  • lrschedulerwarmup_steps: 10
  • num_epochs: 1

Training results

Training LossEpochStepValidation Loss
0.75550.0110.7062
0.70360.0570.6673
0.54220.1140.5152
0.53510.15210.4866
0.4950.2280.4688
0.56510.25350.4587
0.51460.3420.4486
0.49550.35490.4469
0.51170.4560.4432
0.52450.45630.4410
0.50030.5700.4371
0.45020.55770.4340
0.5270.6840.4315
0.480.65910.4305
0.4480.7980.4289
0.54270.751050.4289
0.47150.81120.4279
0.55840.851190.4276
0.49360.91260.4267
0.47880.951330.4268
0.4761.01400.4268

Framework versions

  • Transformers 4.36.0.dev0
  • Pytorch 2.0.1+cu118
  • Datasets 2.15.0
  • Tokenizers 0.15.0
  • PEFT 0.6.0

Evaluation

I'm using MultiPL-E benchmark, the same as Code Llmama using in their paper

ModalPass@kEstimateNum problems
Code LLama - Instruct 13B139.0%159
Our 13B142.4%159

How to reproduce my evaluation? Just run like the offical document of MultiPL-E: https://nuprl.github.io/MultiPL-E/tutorial.html, change the modal name by my model here: mhhmm/typescript-instruct-20k-v2

This is the code that I ran with Google Colab (using A100 40GB, yes, it requires that much GPU RAM)

If you even have a stronger GPU, increase the --batch-size, or --completion-limit

!pip install --upgrade pip
!pip install aiohttp numpy tqdm pytest datasets torch transformers sentencepiece
!git clone https://github.com/nuprl/MultiPL-E
%cd MultiPL-E
!mkdir typescript
!python3 automodel.py --name mhhmm/typescript-instruct-20k-v2 --root-dataset humaneval --lang ts --temperature 0.2 --batch-size 10 --completion-limit 20 --output-dir-prefix typescript
%cd evaluation/src
!python3 main.py --dir ../../typescript --output-dir ../../typescript --recursive
!python3 pass_k.py ./typescript/*