MCPcopy
hub / github.com/HIT-SCIR/ltp / _from_pretrained

Method _from_pretrained

python/interface/ltp/mixin.py:153–166  ·  view source on GitHub ↗

Overwrite this method in subclass to define how to load your model from pretrained.

(
        cls,
        model_id,
        revision,
        cache_dir,
        force_download,
        proxies,
        resume_download,
        local_files_only,
        use_auth_token,
        **model_kwargs,
    )

Source from the content-addressed store, hash-verified

151
152 @classmethod
153 def _from_pretrained(
154 cls,
155 model_id,
156 revision,
157 cache_dir,
158 force_download,
159 proxies,
160 resume_download,
161 local_files_only,
162 use_auth_token,
163 **model_kwargs,
164 ):
165 """Overwrite this method in subclass to define how to load your model from pretrained."""
166 raise NotImplementedError

Callers 1

from_pretrainedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected