Skip to content

Commit

Permalink
Update llm_conversion.ipynb (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
woodyhoko authored Mar 19, 2024
1 parent 7bddb52 commit 48ba946
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/llm_inference/conversion/llm_conversion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -836,29 +836,29 @@
" input_ckpt = '/content/gemma-2b-it/'\n",
" vocab_model_file = '/content/gemma-2b-it/'\n",
" output_dir = '/content/intermediate/gemma-2b-it/'\n",
" output_tflite_file = f'/content/converted_models/gemma_{backend}.tflite'\n",
" output_tflite_file = f'/content/converted_models/gemma_{backend}.bin'\n",
" return converter.ConversionConfig(input_ckpt=input_ckpt, ckpt_format='safetensors', model_type='GEMMA_2B', backend=backend, output_dir=output_dir, combine_file_only=False, vocab_model_file=vocab_model_file, output_tflite_file=output_tflite_file)\n",
"\n",
"def falcon_convert_config(backend):\n",
" input_ckpt = '/content/falcon-rw-1b/pytorch_model.bin'\n",
" vocab_model_file = '/content/falcon-rw-1b/'\n",
" output_dir = '/content/intermediate/falcon-rw-1b/'\n",
" output_tflite_file = f'/content/converted_models/falcon_{backend}.tflite'\n",
" output_tflite_file = f'/content/converted_models/falcon_{backend}.bin'\n",
" return converter.ConversionConfig(input_ckpt=input_ckpt, ckpt_format='pytorch', model_type='FALCON_RW_1B', backend=backend, output_dir=output_dir, combine_file_only=False, vocab_model_file=vocab_model_file, output_tflite_file=output_tflite_file)\n",
"\n",
"def stablelm_convert_config(backend):\n",
" input_ckpt = '/content/stablelm-3b-4e1t/'\n",
" vocab_model_file = '/content/stablelm-3b-4e1t/'\n",
" output_dir = '/content/intermediate/stablelm-3b-4e1t/'\n",
" output_tflite_file = f'/content/converted_models/stablelm_{backend}.tflite'\n",
" output_tflite_file = f'/content/converted_models/stablelm_{backend}.bin'\n",
" return converter.ConversionConfig(input_ckpt=input_ckpt, ckpt_format='safetensors', model_type='STABLELM_4E1T_3B', backend=backend, output_dir=output_dir, combine_file_only=False, vocab_model_file=vocab_model_file, output_tflite_file=output_tflite_file)\n",
"\n",
"\n",
"def phi2_convert_config(backend):\n",
" input_ckpt = '/content/phi-2'\n",
" vocab_model_file = '/content/phi-2/'\n",
" output_dir = '/content/intermediate/phi-2/'\n",
" output_tflite_file = f'/content/converted_models/phi2_{backend}.tflite'\n",
" output_tflite_file = f'/content/converted_models/phi2_{backend}.bin'\n",
"\n",
" return converter.ConversionConfig(input_ckpt=input_ckpt, ckpt_format='safetensors', model_type='PHI_2', backend=backend, output_dir=output_dir, combine_file_only=False, vocab_model_file=vocab_model_file, output_tflite_file=output_tflite_file)\n",
"\n",
Expand Down

0 comments on commit 48ba946

Please sign in to comment.