Comments (4)
Hmm, interesting use case. I did not code in any functionality for users to input any special tokens beyond MASK. Everything typed into the input box is assumed to be tokenized as normal.
I'm not very aware of how QuestionAnswering works. When you insert a [SEP] token, do you want to treat that token as a special token that separates 2 inputs (perhaps question and answer), or do you want to just see what happens when [SEP] is inserted at different points in a sentence?
from exbert.
Thanks for getting back. I want [SEP] to separate the question and passage.
For now, I added a small function that patches together the broken down [SEP]
token. Further, I also disabled the meta_from_tokens
which also breaks down such tokens. These fixed the problem so far.
I think I might have to change more code so that the token_ids
that the model sees are of the form [0, 0,0, ... 0, 1, 1, 1, ... ,1]
to denote two sentences.
I don't know about others but I would very much appreciate a version of this repository that only visualizes attention, and therefore directly operates using huggingface tokenizers rather than spacyface aligners.
from exbert.
I hear you. A large part of the preprocessing for exBERT is tailored to extract linguistic features from each token in a self attention context (i.e., when there is only one input sequence), which does cause situations like the one you have mentioned to break.
Visualizing the attention for pairs of sequences is very possible, and if all you care about is the attention I would point you to https://github.com/jessevig/bertviz.
from exbert.
Yeah, I actually tried BertViz, since I only needed attention visualization, however BertViz doesn't scale well (jessevig/bertviz#26), and is extremely slow (to the point that it doesn't work) for sequences of length 200+.
from exbert.
Related Issues (20)
- corpus explorer unavailable? HOT 1
- Inability to launch responsive server possibly due to package version issues HOT 5
- Makefile doesn't work for spacy HOT 1
- Environment not able to recognize `from_pretrained` from `transformer_details` HOT 3
- loading weights with default model HOT 2
- Corpus View 500 error on Live Demo HOT 2
- Running locally with custom models HOT 4
- Processing Reference Corpus [details] HOT 2
- Server got error after open on browser HOT 1
- Problem running locally
- Not able to install exbert using node version 19 HOT 3
- Not able to use create_corpus.py or create_hdf5.py to create a .hdf5 file
- demo website is not accessible
- provide data files? HOT 5
- spaCy - BPE Alignment sometimes faulty, raises index errors HOT 2
- Attention block doesn't load when running locally HOT 2
- Compatibility with transformers trained on non-language sequential data HOT 2
- i got the error while i process the text?
- while i am doing the data processing?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exbert.