Giter Site home page Giter Site logo

Comments (2)

ocordeiro avatar ocordeiro commented on August 19, 2024

You can use examples/gpt-2/convert-h5-to-ggml.py to convert these models:

PR #35

from ggml.

katsu560 avatar katsu560 commented on August 19, 2024

Thank you for your comment, ocordeiro.
I sync-ed to new master branch code and then did gpt-2/convert-h5-to-ggml.py.
But, unfortunately, rinna's gpt-2 model has no vocab.json and added_tokens.json.
So, the conversion was failed.

Traceback (most recent call last):
  File "../examples/gpt-2/convert-h5-to-ggml.py", line 58, in <module>
    with open(dir_model + "/vocab.json", "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/g/gpt/rinna-gpt-2/medium//vocab.json'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "../examples/gpt-2/convert-h5-to-ggml.py", line 58, in <module>
    with open(dir_model + "/vocab.json", "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/g/gpt/rinna-gpt-2/medium//vocab.json'

I'm sorry for no understanding the model file's detail.
rinna's x-small model's files as follows.

-rwxrwxrwx 1 user user       845 Feb 19 00:13 config.json
-rwxrwxrwx 1 user user       737 Feb 19 00:14 gitattributes.txt
-rwxrwxrwx 1 user user 155916167 Feb 19 00:14 pytorch_model.bin
-rwxrwxrwx 1 user user     60349 Feb 19 00:13 rinna.png
-rwxrwxrwx 1 user user       153 Feb 19 00:13 special_tokens_map.json
-rwxrwxrwx 1 user user    805634 Feb 19 00:13 spiece.model
-rwxrwxrwx 1 user user 149686584 Feb 19 00:13 tf_model.h5
-rwxrwxrwx 1 user user       282 Feb 19 00:13 tokenizer_config.json

from ggml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.