AlibabaResearch / AlibabaResearch/AdvancedLiterateMachinery

some questions about embedding in the code and in the paper

オープン
#64 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
1.8k
フォーク
195
PR マージ指標
30日以内にマージされた PR はありません

説明

![issue](https://github.com/AlibabaResearch/AdvancedLiterateMachinery/assets/68524490/5800625d-bebc-4286-a00a-01663b95799d)

if inputs_embeds is None:
inputs_embeds = self.word_embeddings(input_ids)
token_type_embeddings = self.token_type_embeddings(token_type_ids)

embeddings = inputs_embeds + token_type_embeddings
if self.position_embedding_type == "absolute":
position_embeddings = self.position_embeddings(position_ids)
embeddings += position_embeddings

if "line_bbox" in kwargs:
embeddings += self._cal_spatial_position_embeddings(kwargs["line_bbox"])

if "line_rank_id" in kwargs:
embeddings += self.line_rank_embeddings(kwargs["line_rank_id"])

if "line_rank_inner_id" in kwargs:
embeddings += self.line_rank_inner_embeddings(kwargs["line_rank_inner_id"])`

For the `Token Embeddings`, `1D Seg.Rank Embeddings` and `1D Seg. BIE Embeddings` in the figure, I couldnot understand their meanings, and there is no clear explanation in the paper, finally I found the corresponding position in the code for debugging. As a result, a new problem was encountered. What exactly are `inputs_embeds` and `token_type_embeddings` in the code? Is the result of adding them both together the `Token Embeddings` in the diagram? `1D Seg. Rank Embeddings` are `line_rank_embeddings`? `1D Seg. BIE Embeddings` are `line_rank_inner_embeddings`? Very much looking forward to getting a quickly reply from the developer soon!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。