Edit model card

Description

This model reconstructs fictional narrative stories into the DAGGER JSON format. See more information about the DAGGER dataset.

Example Usage

Make sure you have the latest versions of torch, transformers, quanto, and accelerate with:

pip install -U torch==2.2.1 transformers==4.39.1 quanto==0.1.0 accelerate==0.28.0
from transformers import pipeline, TextStreamer, QuantoConfig

pipe = pipeline(
    "text-generation",
    "dagger-realms/narrative_to_dagger",
    model_kwargs={
        "quantization_config": QuantoConfig(weights="int8"),
        "low_cpu_mem_usage": True,
    },
    device_map="auto",
)
input_stories = [
    "In a hidden nook of the forest just east of the lake, nestled amidst bushes and glowing flora, lay the Brush Den, a sanctuary created by fae hands with a deep reverence for nature's grandeur. The entrance, a portal of entwined twigs and leaves, beckoned the woodland creatures towards the heart of their heartwarming home.\n\nThe den's interior was a union of organic contours and woodsy hues, remarkably crafted from the forest's generous bounty. Nature's workmanship was evident in chairs of intricately woven roots, as comfortable as they were alluring. A wooden table adorned with vibrant forest flowers showcased its glorious transformation under the diligent hands of the fairy folk. On one side, three petite beds made from an intermingling of grass and leaves lay upon the earthy floor. The ethereal light of a lone, dangling glowing flower illuminated the Brush Den, its radiance lending the room a feeling of tranquility.\n\nAmong the exquisite furnishings, the indomitable spirit of the fae trio danced. Faelin, flush with nimble energy, twirled a small wooden knife in his hand as he talked animatedly about his adventures in the dense woods earlier that day, his sparkling green eyes a sparkling reflection of his love for their humble forest abode. \n\n\"There's a grove of fireflies near Ant Hill, glowing brighter than ever,\" he announced, grinning widely, his palm lightly grazing the sturdy leaves of his armor.\n\nSeated across from him, Lila admired the soft petals of her dress, her mind getting lost in the sea of magical herbs she had discovered today. She was a quiet river, gentle and serene, her illuminating wings blending beautifully with the array of flowers on the table. \n\n\"Maybe we could use the light for growing these new herbs I found,\" she chimed in, her fingers brushing the surface of the intriguing flora that she'd placed on the table.\n\nSurveying the tableau before him, Renn was the subtle wind beneath their wings - silent, yet potent. His wisdom resonated in the place he now called home, a testament to his dedication towards protecting his clan. He leaned forward, studying the tattered map spread before him on the table. His fingers traced the paths marked across it, his mind rendering the invisible threats tangible.\n\n\"It's important we stick together,\" he advised, glancing at the eager eyes of his companions, \"Many parts of the forest remain uncharted territory. The Ant Hill up North, the Pine Tree Graveyard to the East, we need to tread cautiously.\"\n\nAs the mood shifted from reminiscence to strategizing, their camaraderie sparkled like their humble glowing beacon. Their concerns echoed off the arched bushes, their resolve interlacing like the roots beneath them. They were born of the forest, part of its life-giving rhythm, destined to defend it from the imminent tempest.\n\nTheir collective decision hung in the air, a pact sealed within the Brush Den's intimate sanctum. Each of them - Faelin with his innovative ideas, Lila with her tranquil wisdom, and Renn with his superior guidance - brought their strengths together for the love of their homeland.\n\nUnited, they stood stronger, the essence of their resolve intertwining with the faint glow of their radiant shelter, ready to hurdle any storm that dared to disrupt the pulse of their sacred forest. Their forest, their home."
]
streamer = TextStreamer(
    pipe.tokenizer, skip_prompt=True
)  # Streams the output to your terminal
output_dagger_jsons = pipe(
    input_stories,
    streamer=streamer,
    max_new_tokens=2048,
    repetition_penalty=1.1,
    do_sample=False,
    return_full_text=False,
    batch_size=1,
)

This model was trained with a synthetic dataset with DataDreamer 🤖💤. The synthetic dataset card and model card can be found here. The training arguments can be found here.

Downloads last month
13
Safetensors
Model size
1.1B params
Tensor type
BF16
·
Inference Examples
Inference API (serverless) has been turned off for this model.

Model tree for dagger-realms/narrative_to_dagger

Finetuned
(2)
this model