"Not for hire" is irrelevant. Not being for hire doesn't exempt it from requiring a CDL. What is relevant is the farm bit. This may exempt it. You won't need a CDL, so long as all of the following conditions are met:
- The truck is registered as a farm truck.
- The truck is used only for the purposes of that farm, and nothing more.
- The vehicle is not hired out on a third party basis (which is illegal with farm plates, anyhow)
- The vehicle remains within a 150 mile radius of the farm it belongs to.
- The vehicle is operated by the farmer, an immediate family member of the farmer, or a direct employee of the farmer (if you're paid on a W2, you're a direct employee; if you're paid on a 1099, you're a contractor, and not a direct employee).
Every single one of those conditions must be met in order for the vehicle to be exempt from requiring a Class B CDL.