ducanhdinh / jepa_proof_boyl_replace

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: June 16 2026

Introduction of jepa_proof_boyl_replace

Model Details of jepa_proof_boyl_replace

ducanhdinh/jepa_proof_boyl_replace

BERT encoder pretrained from scratch với BYOL + Lexical Substitution augmentation .

Augmentation strategy

Thay vì span masking, model này dùng lexical substitution để tạo view 2:

Mô tả
View 1 Câu gốc (không thay đổi)
View 2 15–20% token ngẫu nhiên được thay bằng token ngữ nghĩa gần, dự đoán bởi BERT MLM (top-5, loại trừ token gốc)

Quá trình tạo view 2 được thực hiện offline 1 lần trước khi train.

Kiến trúc BYOL
View 1 ──► Online Encoder (θ) ──► Online Projector (θ) ──► Online Predictor (θ) ──► p1 ──┐
                                                                                           ├── loss = cosine(p1, z2) + cosine(p2, z1)
View 2 ──► Online Encoder (θ) ──► Online Projector (θ) ──► Online Predictor (θ) ──► p2 ──┘
View 1 ──► Target Encoder (ξ) ──► Target Projector (ξ) ──► z1  (stop grad)
View 2 ──► Target Encoder (ξ) ──► Target Projector (ξ) ──► z2  (stop grad)

Target update: ξ ← 0.996·ξ + 0.0040000000000000036·θ  (EMA)
Thông số huấn luyện
Tham số Giá trị
Max sequence length 256
Batch size 256
Epochs 10
Learning rate 0.0001
Projector hidden dim 2048
Projector out dim 256
Predictor hidden dim 1024
EMA decay 0.996
Mask ratio (lexsubst) 0.15–0.2
Top-k candidates 5
Cách dùng — Online BERT encoder (feature extraction)
from transformers import BertModel, BertTokenizerFast
import torch

tokenizer = BertTokenizerFast.from_pretrained("ducanhdinh/jepa_proof_boyl_replace")
bert      = BertModel.from_pretrained("ducanhdinh/jepa_proof_boyl_replace/encoder")

encoded = tokenizer(
    ["Hello world!", "BYOL with lexical substitution."],
    return_tensors="pt",
    padding=True,
    truncation=True,
)
with torch.no_grad():
    out = bert(**encoded)
    cls_emb = out.last_hidden_state[:, 0, :]   # [CLS] token → (B, 768)
Cách dùng — Full model
import torch
from text_byol_replace import TextBYOLReplace, BYOLReplacePretrainConfig

cfg   = BYOLReplacePretrainConfig()
model = TextBYOLReplace(cfg)
state = torch.load(
    hf_hub_download("ducanhdinh/jepa_proof_boyl_replace", "pytorch_model.bin"),
    map_location="cpu",
)
model.load_state_dict(state)
model.eval()

Runs of ducanhdinh jepa_proof_boyl_replace on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About jepa_proof_boyl_replace huggingface.co Model

More jepa_proof_boyl_replace license Visit here:

https://choosealicense.com/licenses/apache-2.0

jepa_proof_boyl_replace huggingface.co

jepa_proof_boyl_replace huggingface.co is an AI model on huggingface.co that provides jepa_proof_boyl_replace's model effect (), which can be used instantly with this ducanhdinh jepa_proof_boyl_replace model. huggingface.co supports a free trial of the jepa_proof_boyl_replace model, and also provides paid use of the jepa_proof_boyl_replace. Support call jepa_proof_boyl_replace model through api, including Node.js, Python, http.

jepa_proof_boyl_replace huggingface.co Url

https://huggingface.co/ducanhdinh/jepa_proof_boyl_replace

ducanhdinh jepa_proof_boyl_replace online free

jepa_proof_boyl_replace huggingface.co is an online trial and call api platform, which integrates jepa_proof_boyl_replace's modeling effects, including api services, and provides a free online trial of jepa_proof_boyl_replace, you can try jepa_proof_boyl_replace online for free by clicking the link below.

ducanhdinh jepa_proof_boyl_replace online free url in huggingface.co:

https://huggingface.co/ducanhdinh/jepa_proof_boyl_replace

jepa_proof_boyl_replace install

jepa_proof_boyl_replace is an open source model from GitHub that offers a free installation service, and any user can find jepa_proof_boyl_replace on GitHub to install. At the same time, huggingface.co provides the effect of jepa_proof_boyl_replace install, users can directly use jepa_proof_boyl_replace installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

jepa_proof_boyl_replace install url in huggingface.co:

https://huggingface.co/ducanhdinh/jepa_proof_boyl_replace

Url of jepa_proof_boyl_replace

jepa_proof_boyl_replace huggingface.co Url

Provider of jepa_proof_boyl_replace huggingface.co

ducanhdinh
ORGANIZATIONS

Other API from ducanhdinh

huggingface.co

Total runs: 361
Run Growth: 349
Growth Rate: 96.68%
Updated:November 24 2025