Skip to content

Commit

Permalink
revise roberta and gpt2
Browse files Browse the repository at this point in the history
  • Loading branch information
NKNaN committed Jan 17, 2024
1 parent 037152d commit 02c628d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 2,055 deletions.
9 changes: 2 additions & 7 deletions paddlemix/models/audioldm2/clap_module/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
import logging

from .htsat_model import create_htsat_model
from paddlenlp.transformers import BertModel, BartModel
from .roberta.model import RobertaModel
from .roberta.configuration import get_rbt_config, RobertaConfig
from paddlenlp.transformers import RobertaModel, BertModel, BartModel


class MLPLayers(nn.Layer):
Expand Down Expand Up @@ -208,10 +206,7 @@ def __init__(
nn.Linear(self.joint_embed_shape, self.joint_embed_shape),
)
elif text_cfg.model_type == "roberta":
rbt_cfg = RobertaConfig(**get_rbt_config())
self.text_branch = RobertaModel(
rbt_cfg
)
self.text_branch = RobertaModel.from_pretrained("roberta-base")
self.text_transform = MLPLayers(
units=[
self.joint_embed_shape,
Expand Down
152 changes: 0 additions & 152 deletions paddlemix/models/audioldm2/clap_module/roberta/configuration.py

This file was deleted.

Loading

0 comments on commit 02c628d

Please sign in to comment.