How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="jianna4/finetuned_disease")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("jianna4/finetuned_disease")
model = AutoModelForCausalLM.from_pretrained("jianna4/finetuned_disease")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Fine-Tuned Falcon-7B for Medical Text Generation

This is a fine-tuned version of the Falcon-7B-Instruct model, adapted for generating medical text related to common diseases. The model has been fine-tuned using LoRA (Low-Rank Adaptation) on a dataset of medical texts.

Model Details

  • Base Model: tiiuae/falcon-7b-instruct
  • Fine-Tuning Method: LoRA (Low-Rank Adaptation)
  • Quantization: 4-bit (using bitsandbytes)
  • Training Dataset: Medical text data (common diseases)
  • Training Framework: PyTorch with Hugging Face Transformers
  • Fine-Tuning Duration: 3 epochs
  • Learning Rate: 1e-3
  • Batch Size: 2 (per device)

Usage

You can use this model for generating medical text or answering questions related to common diseases.

Using the Hugging Face Inference API

  1. Install the transformers library:
    pip install transformers
    """
    
Downloads last month
5
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for jianna4/finetuned_disease

Finetuned
(30)
this model