Downloads · 30 days
16
3% of all-time downloads
rasta/BART-FHIR-question
BART-FHIR-question is a text generation model from rasta. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of bart-large on a manually created dataset. It achieves the following results on the evaluation set: - Loss: 0.40
Downloads · 30 days
16
3% of all-time downloads
All-time downloads
509
Public
Parameters
406M
4.9 GB on disk
Likes
1
Public
Click a slice to open those files.
.bin1.6 GB · 50%
From the Hugging Face model README
This model is a fine-tuned version of bart-large on a manually created dataset. It achieves the following results on the evaluation set:
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| - | 1.0 | 47 | 4.5156 |
| ... | |||
| - | 10 | 490 | 0.4086 |
def generate_text(input_text):
# Tokenize the input text
input_tokens = tokenizer(input_text, return_tensors='pt')
# Move the input tokens to the same device as the model
input_tokens = input_tokens.to(model.device)
# Generate text using the fine-tuned model
output_tokens = model.generate(**input_tokens)
# Decode the generated tokens to text
output_text = tokenizer.decode(output_tokens[0], skip_special_tokens=True)
return output_text
from transformers import BartForConditionalGeneration
# Load the pre-trained BART model from the Hugging Face model hub
model = BartForConditionalGeneration.from_pretrained('rasta/BART-FHIR-question')
input_text = "List all procedures with reason reference to resource with ID 24680135."
output_text = generate_text(input_text)
print(output_text)