Skip to content

Commit

Permalink
Update example/DistilBert_FillMask/fill_mask.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Peter <[email protected]>
  • Loading branch information
deveshjawla and chengchingwen authored Oct 29, 2024
1 parent 7f882cd commit dc6032e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions example/DistilBert_FillMask/fill_mask.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ using FuncPipelines, TextEncodeBase
using TextEncodeBase: nested2batch, nestedcall
using Flux, StatsBase

# conf = Transformers.HuggingFace.load_config("distilbert/distilbert-base-cased")
# state_dict = Transformers.HuggingFace.load_state_dict("distilbert/distilbert-base-cased")

tkr = Transformers.HuggingFace.load_tokenizer("distilbert/distilbert-base-cased")
tkr = Transformers.TextEncoders.BertTextEncoder(tkr) do e
e.process[1:5] |> Pipeline{:masked_position}(nested2batch nestedcall(isequal("[MASK]")), :token) |> e.process[6:end-1] |> PipeGet{(:token, :attention_mask, :masked_position)}()
Expand Down

0 comments on commit dc6032e

Please sign in to comment.