Run this model with HF Jobs

Run riad-hf/riad-disease-gpt 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 and TRL to fine-tune https://huggingface.co/riad-hf/riad-disease-gpt. 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/riad-hf/riad-disease-gpt 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.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/riad-hf/riad-disease-gpt. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/riad-hf/riad-disease-gpt. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Riad Disease Gpt

A lightweight medical question-answering model trained on disease-related queries.

Model Details

  • Type: Custom GPT-style Transformer
  • Language: English
  • Parameters: ~5M
  • Architecture: 6-layer Transformer with 8 attention heads
  • Vocab Size: 2500 (SentencePiece)
  • Context Length: 512 tokens

Usage

from transformers import AutoModel, AutoTokenizer
import sentencepiece as spm

# Load model
model = AutoModel.from_pretrained("riadrayhan111/riad-disease-gpt", trust_remote_code=True)
tokenizer = spm.SentencePieceProcessor()
tokenizer.load('riadrayhan111/riad-disease-gpt/tokenizer.model')

# Generate response
class SimpleTokenizer:
    def __init__(self, sp_model):
        self.sp = sp_model
        self.eos_token_id = 2
    
    def encode(self, text):
        return self.sp.encode(text)
    
    def decode(self, tokens):
        return self.sp.decode(tokens)

tok = SimpleTokenizer(tokenizer)
answer = model.generate_text(tok, "What is fever?", max_length=100)
print(answer)

Training

Trained on a custom medical dataset focused on common diseases, symptoms, and treatments.

Limitations

⚠️ Important: This model is for educational purposes only.

  • Not a substitute for professional medical advice
  • Limited to information in training data
  • Should not be used for medical diagnosis

License

Apache 2.0

Downloads last month
21
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using riad-hf/riad-disease-gpt 1