🐦 Twitter Post Details

Viewing enriched Twitter post

@wightmanr

Okay LLM + PyTorch people, trunc_normal_, what the fuck! Many LLM inits use it w/ default cutoffs. It's either not doing anything or it's quite broken due 2 issues. 1. The a/b cutoffs in PyTorch are not in std-devs, they are absolute. So w/ a std=0.02, and -2/2 (default arg) cutoffs that's 100σ!! That is a normal distribution, trun isn't doing anything. 2. There are numerical issues. Even in float32, the truncation produces a handful of -2 (lower cutoff) values, 100σ!! That's incomprehensibly improbable. I doubt a float32 or even float64 algo could even produce it, but clamping a bad float value does. Olmo (@allenai codebases) appear to be one of the few that uses trunc_normal_ and bothered to set the cutoffs properly. It'd be nice to see more train code opened up as a default. We so often only end up with a sanitized version of the inference/fine-tune friendly model these days and may lose details like original init. I've known about #1 for ages, I have an alternate trunc_normal_tf_ implementation in timm for that reason. But I saw those -2's last week when I was debugging something and was a little surprised.

Media 1

📊 Media Metadata

{
  "media": [
    {
      "url": "https://crmoxkoizveukayfjuyo.supabase.co/storage/v1/object/public/media/posts/2038634643843682366/media_0.jpg",
      "media_url": "https://crmoxkoizveukayfjuyo.supabase.co/storage/v1/object/public/media/posts/2038634643843682366/media_0.jpg",
      "type": "photo",
      "filename": "media_0.jpg"
    }
  ],
  "processed_at": "2026-03-30T23:07:33.057604",
  "pipeline_version": "2.0"
}

🔧 Raw API Response

{
  "type": "tweet",
  "id": "2038634643843682366",
  "url": "https://x.com/wightmanr/status/2038634643843682366",
  "twitterUrl": "https://twitter.com/wightmanr/status/2038634643843682366",
  "text": "Okay LLM + PyTorch people, trunc_normal_, what the fuck! Many LLM inits use it w/ default cutoffs. It's either not doing anything or it's quite broken due 2 issues.\n\n1. The a/b cutoffs in PyTorch are not in std-devs, they are absolute. So w/ a std=0.02, and -2/2 (default arg) cutoffs that's 100σ!! That is a normal distribution, trun isn't doing anything.\n\n2. There are numerical issues. Even in float32, the truncation produces a handful of -2 (lower cutoff) values, 100σ!! That's incomprehensibly improbable. I doubt a float32 or even float64 algo could even produce it, but clamping a bad float value does.\n\nOlmo (@allenai codebases) appear to be one of the few that uses trunc_normal_ and bothered to set the cutoffs properly. It'd be nice to see more train code opened up as a default. We so often only end up with a sanitized version of the inference/fine-tune friendly model these days and may lose details like original init.\n\nI've known about #1 for ages, I have an alternate trunc_normal_tf_ implementation in timm for that reason. But I saw those -2's last week when I was debugging something and was a little surprised.",
  "source": "Twitter for iPhone",
  "retweetCount": 5,
  "replyCount": 3,
  "likeCount": 57,
  "quoteCount": 1,
  "viewCount": 5948,
  "createdAt": "Mon Mar 30 15:09:09 +0000 2026",
  "lang": "en",
  "bookmarkCount": 32,
  "isReply": false,
  "inReplyToId": null,
  "conversationId": "2038634643843682366",
  "displayTextRange": [
    0,
    276
  ],
  "inReplyToUserId": null,
  "inReplyToUsername": null,
  "author": {
    "type": "user",
    "userName": "wightmanr",
    "url": "https://x.com/wightmanr",
    "twitterUrl": "https://twitter.com/wightmanr",
    "id": "557902603",
    "name": "Ross Wightman",
    "isVerified": false,
    "isBlueVerified": true,
    "verifiedType": null,
    "profilePicture": "https://pbs.twimg.com/profile_images/769304549135880192/gUzKgYuk_normal.jpg",
    "coverPicture": "https://pbs.twimg.com/profile_banners/557902603/1472251747",
    "description": "",
    "location": "Vancouver, BC",
    "followers": 23820,
    "following": 1370,
    "status": "",
    "canDm": false,
    "canMediaTag": true,
    "createdAt": "Thu Apr 19 17:34:53 +0000 2012",
    "entities": {
      "description": {
        "urls": []
      },
      "url": {}
    },
    "fastFollowersCount": 0,
    "favouritesCount": 4363,
    "hasCustomTimelines": true,
    "isTranslator": false,
    "mediaCount": 146,
    "statusesCount": 5123,
    "withheldInCountries": [],
    "affiliatesHighlightedLabel": {},
    "possiblySensitive": false,
    "pinnedTweetIds": [],
    "profile_bio": {
      "description": "AI / Computer Vision. Ex head of Software, Firmware Engineering at a Canadian 🦄. Building AI systems or investing in startups that do it better.",
      "entities": {
        "description": {
          "hashtags": [],
          "symbols": [],
          "urls": [],
          "user_mentions": []
        },
        "url": {
          "urls": [
            {
              "display_url": "rwightman.com",
              "expanded_url": "http://rwightman.com/",
              "indices": [
                0,
                23
              ],
              "url": "https://t.co/h3OckviQUt"
            }
          ]
        }
      }
    },
    "isAutomated": false,
    "automatedBy": null
  },
  "extendedEntities": {
    "media": [
      {
        "allow_download_status": {
          "allow_download": true
        },
        "display_url": "pic.twitter.com/wfGR7uS1V7",
        "expanded_url": "https://twitter.com/wightmanr/status/2038634643843682366/photo/1",
        "ext_media_availability": {
          "status": "Available"
        },
        "features": {
          "large": {
            "faces": []
          },
          "orig": {
            "faces": []
          }
        },
        "id_str": "2038634510992932864",
        "indices": [
          277,
          300
        ],
        "media_key": "3_2038634510992932864",
        "media_results": {
          "id": "QXBpTWVkaWFSZXN1bHRzOgwAAQoAARxKr0lelgAACgACHEqvaE0bkD4AAA==",
          "result": {
            "__typename": "ApiMedia",
            "id": "QXBpTWVkaWE6DAABCgABHEqvSV6WAAAKAAIcSq9oTRuQPgAA",
            "media_key": "3_2038634510992932864"
          }
        },
        "media_url_https": "https://pbs.twimg.com/media/HEqvSV6WAAAp-GB.jpg",
        "original_info": {
          "focus_rects": [
            {
              "h": 882,
              "w": 1575,
              "x": 1377,
              "y": 0
            },
            {
              "h": 882,
              "w": 882,
              "x": 1723,
              "y": 0
            },
            {
              "h": 882,
              "w": 774,
              "x": 1777,
              "y": 0
            },
            {
              "h": 882,
              "w": 441,
              "x": 1944,
              "y": 0
            },
            {
              "h": 882,
              "w": 3222,
              "x": 0,
              "y": 0
            }
          ],
          "height": 882,
          "width": 3222
        },
        "sizes": {
          "large": {
            "h": 561,
            "w": 2048
          }
        },
        "type": "photo",
        "url": "https://t.co/wfGR7uS1V7"
      }
    ]
  },
  "card": null,
  "place": {},
  "entities": {
    "hashtags": [],
    "symbols": [],
    "urls": [],
    "user_mentions": [
      {
        "id_str": "3017365872",
        "indices": [
          618,
          626
        ],
        "name": "Allena",
        "screen_name": "allenai"
      }
    ]
  },
  "quoted_tweet": null,
  "retweeted_tweet": null,
  "isLimitedReply": false,
  "article": null
}