{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreig42ndu3go7l7vvl457wd4ndpkrdxhjp6po5yl3yf3l6llkz6capa",
    "uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mgv23zk4s2t2"
  },
  "path": "/t/automodel-with-clinicalbert-gives-unexpected-warning/174220#post_1",
  "publishedAt": "2026-03-12T11:50:38.000Z",
  "site": "https://discuss.huggingface.co",
  "textContent": "I’m using the Python ‘transformers’ package, version 5.3.0 to interact with an existing graph database. The script seems to work, giving me sensible output, but produces a warning that concerns me.\n\nThe warning is produced when this statement is executed:\n\n> model = AutoModel.from_pretrained(“emilyalsentzer/Bio_ClinicalBERT”, token=HF_TOKEN)\n\nThe text of the warning is as follows:\n\n> Loading weights: 100%|\n>\n> BertModel LOAD REPORT from: emilyalsentzer/Bio_ClinicalBERT\n>  Key | Status | |\n>  -------------------------------------------±-----------±-±\n>  cls.predictions.transform.dense.weight | UNEXPECTED | |\n>  cls.predictions.transform.LayerNorm.bias | UNEXPECTED | |\n>  cls.predictions.transform.LayerNorm.weight | UNEXPECTED | |\n>  cls.predictions.bias | UNEXPECTED | |\n>  cls.seq_relationship.weight | UNEXPECTED | |\n>  cls.seq_relationship.bias | UNEXPECTED | |\n>  cls.predictions.transform.dense.bias | UNEXPECTED | |\n>  cls.predictions.decoder.weight | UNEXPECTED | |\n>\n> Notes:\n>\n>   * UNEXPECTED :can be ignored when loading from different task/architecture; not ok if you expect identical arch.\n>\n\n\nI don’t understand what is meant by the phrase “when loading from different task/architecture”. Can someone please explain it? I’m running Python version 3.13.6 in a venv on a Macbook M1 processor.\n\nWhat changes do I need to make to my system/environment such that this ‘UNEXPECTED’ issue is resolved?",
  "title": "AutoModel with ClinicalBERT gives UNEXPECTED warning"
}