GithubHelp home page GithubHelp logo

Running locally with custom models about exbert HOT 4 OPEN

bhoov avatar bhoov commented on July 18, 2024
Running locally with custom models

from exbert.

Comments (4)

bhoov avatar bhoov commented on July 18, 2024

Apologies for taking so long to respond -- exBERT should work out of the box with Roberta but I haven't run it through tests for models trained on more recent versions of huggingface. My guess is that it would work as I am not aware of differences to how they save the model's weights. Would you be willing to try and see what issues you run into with your model? I will gladly take a look to fix/update anything that is not working.

from exbert.

daddydrac avatar daddydrac commented on July 18, 2024

@bhoov - I am unclear how to get this to connect to my existing ClinicalBERT model, can you please provide some guidance so I can see metrics in the web UI?

from exbert.

bhoov avatar bhoov commented on July 18, 2024

The following instructions pull the model from https://huggingface.co/emilyalsentzer/Bio_ClinicalBERT with some sensible defaults. They should also work for a local model saved with huggingface's API

There are 2 main parts to exbert:

  1. Part A: The attention visualization and layer exploration (quick)
  2. Part B: Annotating a custom (small-ish) corpus and searching for nearest embeddings over them. (harder)

After you setup the environment:

  1. Part A: python server/main.py --model emilyalsentzer/Bio_ClinicalBERT --kind bidirectional
  2. Part B: From the root of the project:
cd server/data_processing
python create_corpus.py -f MY_LOCAL_CLINICAL_CORPUS.txt -o ../../clinical_corpus --model emilyalsentzer/Bio_ClinicalBERT
cd ../..
python server/main.py --model emilyalsentzer/BioClinicalBERT --kind bidirectional --corpus clinical_corpus/

from exbert.

daddydrac avatar daddydrac commented on July 18, 2024

@bhoov Thank you šŸ™ kindly for that explanation this helps a lot.

As for using makefile, it does break, and have been unsuccessful starting it up via other instructions.

If you can help me get it going, Iā€™d be more than happy to contribute a Dockerfile so it will run everywhere. I also think that is a opportunity for me to refac some of the code & upgrade to PyTorch 1.7 & HuggingFace:latest, while Iā€™m in there containerizing it. Let me know plz.

from exbert.

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.