mirror of
https://github.com/mii443/usls.git
synced 2025-08-22 15:45:41 +00:00
Add support for Q8 in DType (#103)
This commit is contained in:
@ -15,27 +15,3 @@ The official repository can be found on:
|
|||||||
## Example
|
## Example
|
||||||
|
|
||||||
Refer to the [example](../../../examples/yolo)
|
Refer to the [example](../../../examples/yolo)
|
||||||
|
|
||||||
|
|
||||||
## TODO
|
|
||||||
- [x] YOLOv5-det
|
|
||||||
- [x] YOLOv5-cls
|
|
||||||
- [x] YOLOv5-seg
|
|
||||||
- [x] YOLOv6
|
|
||||||
- [x] YOLOv7
|
|
||||||
- [x] YOLOv8-det
|
|
||||||
- [x] YOLOv8-cls
|
|
||||||
- [x] YOLOv8-pose
|
|
||||||
- [x] YOLOv8-seg
|
|
||||||
- [x] YOLOv8-obb
|
|
||||||
- [x] YOLOv8-world
|
|
||||||
- [x] YOLOv8-rtdetr
|
|
||||||
- [x] YOLOv9
|
|
||||||
- [x] YOLOv10
|
|
||||||
- [x] YOLO11-det
|
|
||||||
- [x] YOLO11-cls
|
|
||||||
- [x] YOLO11-pose
|
|
||||||
- [x] YOLO11-seg
|
|
||||||
- [x] YOLO11-obb
|
|
||||||
- [x] FastSam
|
|
||||||
- [ ] YOLO-NAS
|
|
||||||
|
@ -20,6 +20,7 @@ pub enum DType {
|
|||||||
Bnb4,
|
Bnb4,
|
||||||
Q4,
|
Q4,
|
||||||
Q4f16,
|
Q4f16,
|
||||||
|
Q8,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TryFrom<&str> for DType {
|
impl TryFrom<&str> for DType {
|
||||||
@ -43,6 +44,7 @@ impl TryFrom<&str> for DType {
|
|||||||
"b16" | "bf16" => Ok(Self::Bf16),
|
"b16" | "bf16" => Ok(Self::Bf16),
|
||||||
"q4f16" => Ok(Self::Q4f16),
|
"q4f16" => Ok(Self::Q4f16),
|
||||||
"q4" => Ok(Self::Q4),
|
"q4" => Ok(Self::Q4),
|
||||||
|
"q8" => Ok(Self::Q8),
|
||||||
"bnb4" => Ok(Self::Bnb4),
|
"bnb4" => Ok(Self::Bnb4),
|
||||||
x => anyhow::bail!("Unsupported DType: {}", x),
|
x => anyhow::bail!("Unsupported DType: {}", x),
|
||||||
}
|
}
|
||||||
@ -71,6 +73,7 @@ impl std::fmt::Display for DType {
|
|||||||
Self::Bnb4 => "bnb4",
|
Self::Bnb4 => "bnb4",
|
||||||
Self::Q4 => "q4",
|
Self::Q4 => "q4",
|
||||||
Self::Q4f16 => "q4f16",
|
Self::Q4f16 => "q4f16",
|
||||||
|
Self::Q8 => "q8",
|
||||||
};
|
};
|
||||||
write!(f, "{}", x)
|
write!(f, "{}", x)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user