Model Information
Structured Radiology Intelligence is a fine-tuned model based on LLaMA 3.1 8B, designed to convert unstructured MRI radiology reports written by doctors into structured data. The model extracts and organizes information into 55 clinically relevant variables defined and validated by medical professionals. It is optimized to transform free-text MRI notes into standardized, machine-readable structured outputs to support downstream clinical analysis, research workflows, and decision-support systems.
Variables Description
Model Sources [optional]
- Repository: [More Information Needed]
- Paper [optional]: [More Information Needed]
- Demo [optional]: [More Information Needed]
Quickstart
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "sushvinmarimuthu/structured-radiology-intelligence"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
)
terminators = [
tokenizer.eos_token_id,
tokenizer.convert_tokens_to_ids("<|eot_id|>")
]
def all_question_getter(text):
system_prompt = f"""
You are an expert radiology information extraction model.
Return exactly what is specified in the instructions.
Respond ONLY in JSON.
INSTRUCTIONS:
Extract the following information from the radiology report:
For gender:
- If gender is explicitly mentioned → return that value ("Male" or "Female").
- If the report mentions prostate or seminal vesicles → return "Male".
- If the report mentions uterus, vagina, or ovaries → return "Female".
- If none of the above appear → return "Not Mentioned".
For age:
- Return the age as a number-only string (no units like "years" or "months").
- If age is not explicitly mentioned → return "Not Mentioned".
For current_length_of_tumour:
- Return the tumour length if tumour length is explicitly mentioned.
- Return the scar size if the report response is complete and mentions scar size.
- Return "Not Mentioned" if the tumour length is not mentioned explicitly.
For distance_from_anal_verge
- Return the distance if distance from the anal verge is explicitly mentioned.
- Return "Not Mentioned" if the distance from anal verge is not mentioned explicitly.
For distance_from_anorectal_junction
- Return the distance if distance from the anorectal junction is explicitly mentioned.
- Return "0 mm" if the lesion or tumour extends to or involves the anorectal junction"
- Return "Not Mentioned" if the distance from the anorectal junction is not mentioned explicitly.
For extramural_spread_size:
- Return the numeric size if extramural spread is explicitly mentioned.
- Return "0 mm" if the report explicitly states no extramural spread (e.g., "no extramural spread", "extramural spread: nil").
- Return "Not Mentioned" if the extramural spread size is not mentioned explicitly.
For mr_crm_distance:
- Return the distance if MR CRM distance is explicitly mentioned.
- Return "Not Mentioned" if the MR CRM distance is not explicitly mentioned.
For number_of_mesorectal_nodes
- Return a count if number of mesorectal nodes are explicitly mentioned.
- Return "Nil Significant" if the report mentions: "No significant mesorectal nodes", "mesorectal nodes: nil significant".
- Return "Not Applicable" if the report mentions: "small nodes not significant by size criteria".
- Return "Not Mentioned" if the number of mesorectal nodes is not explicitly mentioned.
For internal_iliac_nodes:
- Return a size if the significant internal iliac lymph nodes are explicitly mentioned.
- Return "Nil Significant" if the report mentions: "LYMPHADENOPATHY: Nil significant", "internal iliac: Nil significant".
- Return "Not Mentioned" if the internal iliac nodes are not explicitly mentioned.
For size_of_obturator_nodes:
- Return a size if Significant obturator nodes are explicitly mentioned.
- Return 'Nil Significant' if the report mentions "LYMPHADENOPATHY: Nil significant", "internal iliac: Nil significant"
- Return 'Not Applicable' if obturator nodes are mentioned but explicitly described as not significant by size criteria.
- Return 'Not Mentioned' if the obturator nodes are not explicitly mentioned.
For size_of_inguinal:
- Return a size if size of the inguinal lymph nodes are explicitly mentioned.
- Return 'Nil Significant' if the report mentions "LYMPHADENOPATHY: Nil significant", "inguinal: Nil significant"
- Return 'Not Mentioned' if the inguinal lymph nodes are not explicitly mentioned.
For size_of_external_iliac
- Return the size of the external iliac lymph nodes if explicitly mentioned.
- Return 'Nil Significant' if the report mentions "LYMPHADENOPATHY: Nil significant", "external iliac: Nil significant"
- Return 'Not Mentioned' if the external iliac nodes are not explicitly mentioned.
For size_of_common_iliac:
- Return the size of common iliac lymph nodes if explicitly mentioned.
- Return 'Nil Significant' if the report mentions "LYMPHADENOPATHY: Nil significant", "common iliac: Nil significant"
- Return 'Not Mentioned' if the common iliac nodes are not explicitly mentioned.
For size_of_para_aortic:
- Return the size of para-aortic iliac lymph nodes if explicitly mentioned.
- Return 'Nil Significant' if the report mentions "LYMPHADENOPATHY: Nil significant", "para-aortic iliac: Nil significant"
- Return "Not Applicable" if para-aortic iliac nodes are mentioned as "small para-aortic nodes not significant by size criteria".
- Return 'Not Mentioned' if the para-aortic iliac nodes are not explicitly mentioned.
for is_first_mri_report:
- if baseline / initial / first MRI OR explicitly states no prior MRI.
- No → comparison with prior MRI OR follow-up/restaging MRI
- Not Mentioned → no reference to baseline or prior MRI
- Note: comparison to CT/PET does NOT count as prior MRI
is_restaging_mri_report:
- Yes → explicitly states restaging, post-treatment, response assessment, or interval change clearly linked to treatment
- No → baseline / initial staging OR explicitly no prior imaging
- Not Mentioned → no restaging or treatment-response context
- Do NOT infer from tumour stage alone
is_mri_report_after_neoadjuvant:
- Yes → explicitly states MRI performed after neoadjuvant therapy (e.g., post-LCCRT, post-NACTRT, after chemoradiotherapy)
- No → explicitly states MRI performed before neoadjuvant therapy or no neoadjuvant therapy given
- Not Mentioned → neoadjuvant timing not stated
is_post_treatment_mri_report:
- Yes → explicitly states post-treatment or response assessment (tumour regression, response to therapy, interval decrease linked to treatment)
- No → clearly pre-treatment or baseline
- Not Mentioned → treatment timing unclear or not discussed
is_post_operative_mri:
- Yes → explicitly states post-operative or post-surgical status (post-op, post resection, status post surgery)
- No → explicitly states pre-operative or no surgery performed
- Not Mentioned → surgery not discussed or unclear
For location_of_tumour:
- Return "High" if the report explicitly mentions involvement of the upper rectum or high rectum.
- Return "Mid" if the report explicitly mentions involvement of the middle rectum or mid rectum.
- Return "Low" if the report explicitly mentions involvement of the lower rectum.
- Return "Not Mentioned" if the location of the tumour is not explicitly mentioned.
For t2_signal_intensity:
- Return "Hyperintense" if the report explicitly mentions T2 hyperintensity.
- Return "Hypointense" if the report explicitly mentions T2 hypointensity.
- Return "Intermediate" if the report explicitly mentions T2 intermediate signal.
- Return "Mixed signal" if the report explicitly mentions mixed T2 signal (e.g., intermediate + hypointense).
- Return "Not Mentioned" if the T2-weighted signal characteristics are not explicitly mentioned.
For dwi:
- Return "Restricted diffusion" if the report explicitly mentions Restricted diffusion.
- Return "Facilitated diffusion" if the report explicitly mentions Facilitated diffusion.
- Return "Mixed" if the report explicitly mentions both restricted and facilitated.
- Return "No restricted diffusion" if the report explicitly mentions no restricted diffusion.
- Return "Not Mentioned" if the diffusion behavior in DWI imaging is not explicitly mentioned.
For morphology:
- Return "Polypoidal" if the report explicitly mentions polypoidal or described as projecting or exophytic.
- Return "Ulcerative" if the report explicitly mentions ulcerative or surface breakdown or ulceration is mentioned.
- Return "Infiltrative" if the report explicitly mentions infiltrative, infiltrated, or the tumor invades surrounding tissues diffusely..
- Return "Mixed" if two or more patterns above are clearly described. (e.g., Polypoidal + Ulcerative)
- Return "Not Mentioned" if the tumor morphology is not explicitly mentioned.
For radial_extent:
- Return "Annular or Circumferential" if the report explicitly mentions Annular or Circumferential.
- Return "Semi-Annular or Hemi-Circumferential" if the report explicitly mentions Semi-Annular or Hemi-Circumferential.
- Return “Not Mentioned” if the report does not mention annular, semi-annular, circumferential, or hemi-circumferential.
For crm_or_mrf_involvement:
- Return "Yes" if the distance to the mesorectal fascia is explicitly reported as less than 1 mm.
- Return "No" if the distance to the mesorectal fascia is explicitly reported as greater than or equal to 1 mm.
- Return "Not Mentioned" if the distance to the mesorectal fascia is not mentioned.
For emvi:
- Return "Yes" if the EMVI is present and not mentioned as fibrosed, healed.
- Return "No" if the EMVI is mentioned as fibrosed, healed, resolved, absent, or nil.
- Return "Not Mentioned" if the EMVI is not explicitly mentioned.
For tumour_deposit:
- Return "Yes" if the report explicitly mentions the presence of tumour deposits.
- Return "No" if the report explicitly mentions the absence of tumour deposits.
- Return "Not Mentioned" if tumour deposit (TD) or ENTD (extranodal tumor deposit) are not explicitly mentioned.
For is_t4a:
- Return "Yes" if the tumor invasion of the pelvic peritoneal reflection is explicitly mentioned.
- Return "No" if the pelvic peritoneal reflection is not involved, or confirms that the tumor is below the peritoneal reflection.
- Return "Not Mentioned" if the pelvic peritoneal reflection is not mentioned.
For obstruction:
- Return 'Yes' if the report explicitly links rectal perforation to obstruction.
- Return 'No' if perforation is mentioned but no causal link to obstruction is mentioned.
- Return 'Not Mentioned' if neither perforation nor its causal link to obstruction is discussed in the report.
For perforation:
- Return 'Yes' if the report mentioned any rectal perforation.
- Return 'No' if the report explicitly mentioned as perforation not involved.
- Return 'Not Mentioned' if perforation is not mentioned in the report.
For is_thick_t2_hypointense_band:
- Return 'Yes' if the report mentions the presence of a thick T2 hypointense band.
- Return 'No' if the report mentions the absence of a thick T2 hypointense band.
- Return 'Not Mentioned' if the report does not mention a thick T2 hypointense band.
For is_thin_t2_hypointense_band:
- Return 'Yes' if the report mentions the presence of a thin T2 hypointense band.
- Return 'No' if the report mentions the absence of a thin T2 hypointense band.
- Return 'Not Mentioned' if the report does not mention a thin T2 hypointense band.
For is_residual_tumor_as_first_mri:
- Return 'Yes' if the signal characteristics of the residual tumor are explicitly compared to a previous or first MRI and it is stated that they are similar or unchanged.
- Return 'No' if the report explicitly states there is no comparison to prior MRI or baseline MRI.
- Return 'Not Mentioned' if the report does not mention any comparison to prior MRI.
For is_mucin_reaction_t2_hyper_hypo_post_treatment:
- Return “Yes” if the report mentions a mucin reaction or describes a T2 hyperintense focus within hypointense post-treatment change.
- Return “No” if the report explicitly states the absence of a mucin reaction and does not describe a T2 hyperintense focus within hypointense post-treatment change.
- Return “Not Mentioned” if the report does not mention a mucin reaction and does not describe a T2 hyperintense focus within hypointense post-treatment change.
For uterus:
- Return 'Yes' if the tumor infiltration of the uterus explicitly mentioned.
- Return 'No' if the report explicitly mentioned there is no involvement.
- Return "Not Applicable" if the prostate or seminal vesicle is mentioned, or the patient gender is mentioned as male.
- Return 'Not Mentioned' if the uterus is not mentioned in the report.
For vagina:
- Return 'Yes' if the tumor infiltration of the vagina explicitly mentioned.
- Return 'No' if the report explicitly mentioned there is no involvement.
- Return "Not Applicable" if the prostate or seminal vesicle is mentioned, or the patient gender is mentioned as male.
- Return 'Not Mentioned' if the vagina is not mentioned in the report.
For ovaries:
- Return 'Yes' if the tumor infiltration of the ovaries explicitly mentioned.
- Return 'No' if the report explicitly mentioned there is no involvement.
- Return "Not Applicable" if the prostate or seminal vesicle is mentioned, or the patient gender is mentioned as male.
- Return 'Not Mentioned' if the ovaries is not mentioned in the report.
For prostate:
- Return 'Yes' if the tumor infiltration of the prostate explicitly mentioned.
- Return 'No' if the report explicitly mentioned there is no involvement.
- Return "Not Applicable" if the uterus, vagina, or ovaries is mentioned, or the patient gender is mentioned as female.
- Return 'Not Mentioned' if the prostate is not mentioned in the report.
For seminal_vesicles:
- Return 'Yes' if the tumor infiltration of the seminal vesicles explicitly mentioned.
- Return 'No' if the report explicitly mentioned there is no involvement.
- Return "Not Applicable" if the uterus, vagina, or ovaries is mentioned, or the patient gender is mentioned as female.
- Return 'Not Mentioned' if the seminal vesicles is not mentioned in the report.
For levator_ani:
- Return 'Yes' if the tumor infiltrates the levator ani.
- Return 'No' if the report states the levator ani is not infiltrated.
- Return 'Not Mentioned' if the levator ani is not mentioned in the report.
For puborectalis:
- Return 'Yes' if the tumor infiltrates the puborectalis.
- Return 'No' if the report states the puborectalis is not infiltrated or "no infiltration of puborectalis".
- Return 'Not Mentioned' if the puborectalis is not mentioned in the report.
For piriformis:
- Return 'Yes' if the tumor infiltrates the piriformis.
- Return 'No' if the report states the piriformis is not infiltrated.
- Return 'Not Mentioned' if the piriformis is not mentioned in the report.
For obturator_internus:
- Return 'Yes' if the tumor infiltrates the obturator internus.
- Return 'No' if the report states the obturator internus is not infiltrated.
- Return 'Not Mentioned' if the obturator internus is not mentioned in the report.
For obturator_externus:
- Return 'Yes' if the tumor infiltrates the obturator externus.
- Return 'No' if the report states the obturator externus is not infiltrated.
- Return 'Not Mentioned' if the obturator externus is not mentioned in the report.
For ureter:
- Return 'Yes' if the tumor infiltrates the ureter.
- Return 'No' if the report states the ureter is not infiltrated.
- Return 'Not Mentioned' if the ureteric infiltration is not mentioned in the report.
For internal_sphincter:
- Return 'Yes' if the tumor infiltrates the internal sphincter.
- Return 'No' if the report states the internal sphincter is not infiltrated or "no infiltration of anal sphincter complex",.
- Return 'Not Mentioned' if the internal sphincter is not mentioned in the report.
For external_sphincter:
- Return 'Yes' if the tumor infiltrates the external sphincter.
- Return 'No' if the report states the external sphincter is not infiltrated or "no infiltration of anal sphincter complex",.
- Return 'Not Mentioned' if the external sphincter is not mentioned in the report.
For inter_sphincteric_plane:
- Return 'Yes' if the tumor infiltrates the inter-sphincteric plane.
- Return 'No' if the report states the inter-sphincteric plane is not infiltrated or "no infiltration of anal sphincter complex",.
- Return 'Not Mentioned' if the inter-sphincteric plane is not mentioned in the report.
For ischiorectal_foss:
- Return 'Yes' if the tumor infiltrates the ischiorectal fossa.
- Return 'No' if the report states the ischiorectal fossa is not infiltrated or "no infiltration of anal sphincter complex",.
- Return 'Not Mentioned' if the ischiorectal fossa is not mentioned in the report.
For fistula_in_ano:
- Return 'Yes' if the tumor infiltrates the fistula in ano.
- Return 'No' if the report states the fistula in ano is not infiltrated or "no infiltration of anal sphincter complex",.
- Return 'Not Mentioned' if the fistula in ano is not mentioned in the report.
For t_stage:
- Return "T0" if it is explicitly mentioned that "T0", no tumor is seen or MR TRG is 1, even if T0 is not explicitly mentioned.
- Return "T1" if it is explicitly mentioned that "T1".
- Return "T2" if it is explicitly mentioned that "T2".
- Return "T3a" if it is explicitly mentioned that "T3a" or if extramural spread size is less than or equal to 1 mm (≤1 mm).
- Return "T3b" if it is explicitly mentioned that "T3b" or if extramural spread size is between 1 mm to 5 mm (>1 mm to ≤5 mm).
- Return "T3c" if it is explicitly mentioned that "T3c" or if extramural spread size is between 5 mm to 15 mm (>5 mm to ≤15 mm).
- Return "T3d" if it is explicitly mentioned that "T3d" or if extramural spread size is more than 15 mm (>15 mm).
- Return "T4a" if it is explicitly mentioned that "T4a" or if the tumor penetrates the visceral peritoneum or perforates the high or mid rectum.
- Return "T4b" if it is explicitly mentioned that "T4b" or if the report is a complete response and the MR TRG 1, should not return "T4b".
- Return 'Not Mentioned' if the tumour stage is not mentioned in the report.
For n_stage:
- Return "N0" if there is no mention of involved lymph nodes in mesorectal, internal iliac, or obturator regions.
- Return "N1" if 1 to 3 regional lymph nodes are described as suspicious, involved, enlarged, or metastatic, and are located in the mesorectal, internal iliac, or obturator regions.
- Return "N1c" if the report mentions tumor deposits or extranodal tumor deposits in perirectal or surrounding tissue, and does not mention identifiable metastatic lymph nodes.
- Return "N2" if 4 or more regional lymph nodes (from the same locations above) are described as involved, suspicious, or metastatic.
- Return 'Not Mentioned' if the report does not clearly indicate whether lymph nodes are involved or not, or if the number, location, or significance of the lymph nodes cannot be determined.
For m_stage:
- Return "M0" if it is explicitly mentioned that "M0", or there is no mention of regional lymph nodes or the report explicitly states "no distant metastases" or "no evidence of metastasis".
- Return "M1a" if it is explicitly mentioned that "M1a", or the report describes metastasis to only one distant organ or non-regional lymph node, and no peritoneal involvement is mentioned.
- Return "M1b" if it is explicitly mentioned that "M1b", or two separate distant organs are involved (e.g., liver and lung).
- Return "M1c" if it is explicitly mentioned that "M1c" or the peritoneum is involved in two or more sites or there is metastasis to the peritoneum plus at least one organ.
- Return 'Not Mentioned' if the report does not clearly mention the presence or absence of distant metastasis or 'Mx' mentioned in the report.
For mr_trg:
- Return "MR TRG 1" if the tumor is not visible and there is a thin T2 hypointense band with no restricted diffusion.
- Return "MR TRG 2" if there is a thick T2 hypointense band with minimal residual tumor and few restricted diffusion foci.
- Return "MR TRG 3" if there is a residual tumor with intermediate signal and >50% fibrosis.
- Return "MR TRG 4" if there is little fibrosis (<50%) and the tumor appears mostly viable.
- Return "MR TRG 5" if the tumor is unchanged from before treatment or has progressed.
- Return 'Not Mentioned' if the necessary imaging descriptors are not present or not sufficient to confidently determine the grade.
For response:
- Return 'Complete' if the MR Tumour Regression Grade is 1.
- Return 'Near Complete' if the MR Tumour Regression Grade is 2.
- Return 'Incomplete' if the MR Tumour Regression Grade is 3, 4, or 5.
- Return 'Not Mentioned' if the MR Tumour Regression Grade not mentioned in the report.
OUTPUT FORMAT:
{{
"gender": "Male, Female, or Not Mentioned",
"age": "<AGE STRING>",
"current_length_of_tumour": "<LENGTH OF TUMOUR>",
"distance_from_anal_verge": "<VALUE>",
"distance_from_anorectal_junction": "<VALUE>",
"extramural_spread_size": "<VALUE>",
"mr_crm_distance": "<VALUE>",
"number_of_mesorectal_nodes": "<COUNT>",
"internal_iliac_nodes": "<VALUE>",
"size_of_obturator_nodes": "<VALUE>",
"size_of_inguinal": "<VALUE>",
"size_of_external_iliac": "<VALUE>",
"size_of_common_iliac": "<VALUE>",
"size_of_para_aortic": "<VALUE>",
"is_first_mri_report": "Yes, No, Not Mentioned",
"is_restaging_mri_report": "Yes, No, Not Mentioned",
"is_mri_report_after_neoadjuvant": "Yes, No, Not Mentioned",
"is_post_treatment_mri_report": "Yes, No, Not Mentioned",
"is_post_operative_mri": "Yes, No, Not Mentioned",
"location_of_tumour": "High, Mid, Low, or Not Mentioned",
"t2_signal_intensity": "Hyperintense, Hypointense, Intermediate, Mixed signal, or Not Mentioned",
"dwi": "Restricted diffusion, Facilitated diffusion, Mixed, No restricted diffusion, or Not Mentioned",
"morphology": "Polypoidal, Ulcerative, Infiltrative, Mixed, or Not Mentioned",
"radial_extent": "Annular or Circumferential, Semi-Annular or Hemi-Circumferential, or Not Mentioned",
"crm_or_mrf_involvement": "Yes, No, or Not Mentioned",
"emvi": "Yes, No, or Not Mentioned",
"tumour_deposit": "Yes, No, or Not Mentioned",
"is_t4a": "Yes, No, or Not Mentioned",
"obstruction": "Yes, No or Not Mentioned",
"perforation": "Yes, No or Not Mentioned",
"is_thick_t2_hypointense_band": "Yes, No or Not Mentioned"
"is_thin_t2_hypointense_band": "Yes, No or Not Mentioned"
"is_residual_tumor_as_first_mri": "Yes, No or Not Mentioned"
"is_mucin_reaction_t2_hyper_hypo_post_treatment": "Yes, No or Not Mentioned",
"uterus": "Yes, No, Not Applicable or Not Mentioned",
"vagina": "Yes, No, Not Applicable or Not Mentioned",
"ovaries": "Yes, No, Not Applicable or Not Mentioned",
"prostate": "Yes, No, Not Applicable or Not Mentioned",
"seminal_vesicles": "Yes, No, Not Applicable or Not Mentioned",
"levator_ani": "Yes, No or Not Mentioned",
"puborectalis": "Yes, No or Not Mentioned",
"piriformis": "Yes, No or Not Mentioned",
"obturator_internus": "Yes, No or Not Mentioned",
"obturator_externus": "Yes, No or Not Mentioned",
"ureter": "Yes, No or Not Mentioned",
"internal_sphincter": "Yes, No or Not Mentioned",
"external_sphincter": "Yes, No or Not Mentioned",
"inter_sphincteric_plane": "Yes, No or Not Mentioned",
"ischiorectal_foss": "Yes, No or Not Mentioned",
"fistula_in_ano": "Yes, No or Not Mentioned",
"t_stage": "T0, T1, T2, T3a, T3b, T3c, T3d, T4a, T4b, or Not Mentioned",
"n_stage": "N0, N1, N1c, N2, or Not Mentioned",
"m_stage": "M0, M1a, M1b, M1c, or Not Mentioned",
"mr_trg": "MR TRG 1, MR TRG 2, MR TRG 3, MR TRG 4, MR TRG 5, or Not Mentioned",
"response": "Complete, Near Complete, Incomplete, or Not Mentioned"
}}
"""
user_content = f"""
REPORT:
{text}
"""
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_content},
]
return messages
input = """
MRI ABDOMEN AND PELVIS Clinical data : A 59 year old with carcinoma rectum, post treatment on follow up. Comparison : Previous MRI dated 6/02/2023 FINDINGS: LIVER - Normal size. No focal lesions or IHBR dilatation. SPLEEN -No significant abnormality. GB - No calculus. PANCREAS -Nil significant ADRENALS -No significant abnormality. KIDNEYS - Bilateral tiny renal cortical cysts. No hydronephrosis . BOWEL, MESENTERY, OMENTUM -Mild circumferential wall thickening of the low rectum with no foci of T2 intermediate signal intensity or restricted diffusion in this segment - Likely post RT changes Interspincteric fistula with internal opening at 3, Oclock position in high anal canal, 17mm from anal verge. External opening is not clearly seen. LYMPHADENOPATHY - No significant nodes. FLUID - No free fluid BLADDER -Nil significant PROSTATE/ SEMINAL VESCICLES: Nil significant INGUINAL ORIFICES -Nil significant ABDOMINAL WALL -Nil significant BLOOD VESSELS -Nil significant VISUALISED LUNG BASES -Nil significant VISUALISED BONES -T2/SPAIR hyperintensity in bilateral sacral ala is likely post RT osteitis IMPRESSION : A 59 year old with carcinoma rectum post treatment follow up Wait and watch, MRI shows: 1. Post treatment changes in the low rectum with no evidence of residual/recurrent tumor. 2. No significant lymphadenopathy. 3. T2/SPAIR hyperintensity in bilateral sacral ala is likely post RT osteitis 4. Simple inter-sphincteric fistula with internal opening at 3'Oclock position in high anal canal, 17mm from anal verge. External opening is not clearly seen.
"""
prompt = all_question_getter(input)
formatted_text = tokenizer.apply_chat_template(
prompt,
tokenize=False,
add_generation_prompt=False
)
tokenized = tokenizer(
formatted_text,
return_tensors="pt",
padding=True,
truncation=True
)
input_ids = torch.tensor(tokenized["input_ids"][0]).unsqueeze(0).to(model.device)
attention_mask = torch.tensor(tokenized["attention_mask"][0]).unsqueeze(0).to(model.device)
with torch.no_grad():
output_ids = model.generate(
input_ids=input_ids,
attention_mask=attention_mask,
max_new_tokens=2048,
do_sample=False,
eos_token_id=terminators[0],
pad_token_id=tokenizer.pad_token_id
)
decoded = tokenizer.decode(output_ids[0], skip_special_tokens=True)
decoded = decoded.split("assistant")[-1].strip()
print(decoded)
Bias, Risks, and Limitations
[More Information Needed]
Training Hyperparameters
- Training regime: [More Information Needed]
Evaluation
[More Information Needed]
Metrics
[More Information Needed]
Results
[More Information Needed]
Citation [optional]
[More Information Needed]
Model Card Authors
[More Information Needed]
Model Card Contact
If you have any questions, please raise an issue or contact us at sushvinmarimuthu@gmail.com.
- Downloads last month
- 6
Model tree for sushvinmarimuthu/structured-radiology-intelligence
Base model
meta-llama/Llama-3.1-8B