Image Classification
Transformers
PyTorch
English
sybil
medical
cancer
ct-scan
risk-prediction
healthcare
vision
Run this model with HF Jobs
Run Lab-Rasool/sybil on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Lab-Rasool/sybil. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Lab-Rasool/sybil on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Lab-Rasool/sybil with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lab-Rasool/sybil with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Lab-Rasool/sybil") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Lab-Rasool/sybil", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Delete configuration_sybil.py
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263"""Sybil model configuration"""
from transformers import PretrainedConfigfrom typing import Optional, List, Dictimport json
class SybilConfig(PretrainedConfig): """ This is the configuration class to store the configuration of a [`SybilForRiskPrediction`]. It is used to instantiate a Sybil model according to the specified arguments, defining the model architecture.
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs.
Args: hidden_dim (`int`, *optional*, defaults to 512): Dimensionality of the hidden representations. dropout (`float`, *optional*, defaults to 0.0): The dropout probability for all fully connected layers. max_followup (`int`, *optional*, defaults to 6): Maximum number of years for risk prediction. num_images (`int`, *optional*, defaults to 208): Number of CT scan slices to process. img_size (`List[int]`, *optional*, defaults to `[512, 512]`): Size of input images after preprocessing. voxel_spacing (`List[float]`, *optional*, defaults to `[0.703125, 0.703125, 2.5]`): Target voxel spacing for CT scans (row, column, slice thickness). censoring_distribution (`str`, *optional*, defaults to "weibull"): Distribution used for censoring in survival analysis. ensemble_size (`int`, *optional*, defaults to 5): Number of models in the ensemble. calibrator_data (`Dict`, *optional*): Calibration data for risk score adjustment. """
model_type = "sybil"
def __init__( self, hidden_dim: int = 512, dropout: float = 0.0, max_followup: int = 6, num_images: int = 208, img_size: List[int] = None, voxel_spacing: List[float] = None, censoring_distribution: str = "weibull", ensemble_size: int = 5, calibrator_data: Optional[Dict] = None, initializer_range: float = 0.02, **kwargs ): super().__init__(**kwargs)
self.hidden_dim = hidden_dim self.dropout = dropout self.max_followup = max_followup self.num_images = num_images self.img_size = img_size if img_size is not None else [512, 512] self.voxel_spacing = voxel_spacing if voxel_spacing is not None else [0.703125, 0.703125, 2.5] self.censoring_distribution = censoring_distribution self.ensemble_size = ensemble_size self.calibrator_data = calibrator_data self.initializer_range = initializer_rangeconfiguration_sybil.pyDeleted-63