Sentence never ending #460
Replies: 3 comments 1 reply
-
Thank you! Would you mind setting the random seed so I can reproduce these exact examples locally? |
Beta Was this translation helpful? Give feedback.
-
When setting the seed with: import numpy as np
import torch
seed = 2
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed)
rng = torch.Generator(device="cuda")
rng.manual_seed(seed)
# [...]
for i in range(10):
output = generate.regex(model, regex, max_tokens=512)(prompt, rng=rng)
# [...] I get the result below, where Guided output 0 is:
Laure should choose to give John a dog, as John loves dogs and is allergic to cats [3][4].
Guided output 1 is:
Laura should choose to give John a dog, as he loves dogs but is allergic to cats [3][4].
SOURCES :
[1]! BREAKING NEWS: Seven stabbed to death in London attack
[2]! Boris Johnson announced as Conservative Party leader
[3]! London Bridge terrorists identified as Usman and Rachid
[4]! London Bridge terrorists named as Usman Khan and Rachid Redouane
[5]! London Bridge: What do we know about the attackers so far
[1]! Man suspected of killing Syrian kurds captured in Russia
[3]! Russian intelligence says it caught a man suspected of killing Syrian Kurds
[2]! Ukraine crisis: Four dead as tanks clash near marriage reception
[1]! Russia admits attacking Ukrainian vessels in Kerch Strait
[3]! Russian news agency RIA sees no grounds to believe Putin's remarks on the Kerch Strait
[2]! Russian and Ukrainian ships clash off Crimea's Kerch Strait
[1]! Russian monitoring vessel issued navigational danger warning to Ukrainian ships
[3]! Russian warships and a coast guard vessel trained their weapons allowed by international rules on three Ukrainian navy boats, TV distorted the footage
[2]! Why was Russian Media spreading Fake news about aircraft crashed near Donetsk
[1]! Two killed in California wildfire as outbreak worsens
[2]! Wildfires: 'Horror' sight as toddler, father are led from flames by armed sheriff's deputy
[3]! Donald Trump's first two years: the presidential report card
[4]! Trump's first two years: Has 'America First' made America first among Richard Haass's seven tests evaluates the record
[5]! Trump presidency: A priority, but is it still the right focus for congressional Democrats, the senatored Trump-Russia inquiries, of Robert Mueller have helped to clarify questions about Donald Trump's ties to Moscow, basic lines of trajectory, and contours of likely outcome, a congressional roll call and analysis suggests everyone involved may be working under fundamentally false assumptions, as a Democratic House scrutinizes the Trump administration more closely, four years of dust Diego Garcia and chag
Guided output 2 is:
Laura should choose to give John a dog and not a cat, as John loves dogs and is allergic to cats [3][4]. The information about John's birthday [5]. However, Laura's preference for what John receives is not provided, so ultimately it is up to her to choose what gift she thinks would be best [1][2].
Guided output 3 is:
Laura should choose to give John a dog as John loves dogs and is allergic to cats [3][4]. Note: since we do not have any information about Laura's preference, it is not considered in the answer, but it can be added if provided in any of the sources provided above or elsewhere in the given context or situation which is not included as a source for this problem statement, then the answer could be decided accordingly while considering Laura's preference as well in the given scenario or context provided by the user for this problem statement's answer extraction requirement based on the given sources provided above or elsewhere as specifically used by the user for the provided question's answer extraction need determined in this given problem statement scenario or context definition provided by the user for this problem statement's answer extraction requirement based on the given sources provided above or elsewhere as specifically used by the user for this provided question's answer extraction need determined in this given problem statement scenario or context definition provided by the user for this problem statement's answer extraction requirement based on the given sources provided above or elsewhere as specifically used by the user for this provided question's answer extraction need determined in this given problem statement scenario or context definition provided by the user for this provided question's answer extraction need determined in this given problem statement scenario or context definition provided by the user for this provided question's answer extraction requirement based on the given sources provided above or elsewhere as specifically used by the user for this provided question's answer extraction need determined in this given problem statement scenario or context definition provided by the user for this provided question's answer extraction requirement based on the given sources provided above or elsewhere as specifically used by the user for this provided question's answer extraction need determined in this given problem statement scenario or context definition provided by the user for this provided question's answer extraction requirement based on the given sources provided above or elsewhere as specifically used by the user for this provided question's answer extraction need determined in this given problem statement scenario or context definition provided by the user for this provided question's answer extraction requirement based on the given sources provided above or elsewhere as specifically used by the user for this provided question's answer extraction need determined in this given problem statement scenario or context definition provided by the user for this provided question's answer extraction requirement based on the given sources provided above or elsewhere as specifically used by the user for this provided question's answer extraction need determined in this given problem
Guided output 4 is:
Laura should choose to give John a dog, as John loves dogs and is allergic to cats [3][4]. However, there is no information provided about whether John prefers a dog over a cat as a gift, so it ultimately comes down to Laura's discretion based on their personal relationship [1].
Guided output 5 is:
Laurations cannot be inferred from the given sources as there is no information provided about Laura's decision-making process or her relationship with John and Laura beyond what is stated in sources [1]. However, we know that John is allergic to cats [3]. Therefore, if Laura wants John to enjoy the gift, she should choose a dog for his birthday [4]. So, Laura should choose to give John a dog for his birthday [5].
Citation: [4][5]!
Literally, every single notebook in the world is different, and everyone's tasks and to-do lists are different too, but in Todoist, everyone has the same workspace: the same tasks, keywords, projects, labels, filters, and more, so teaching and learning is that much easier for our users and their team members, students, clients, and so on; see our case studies and testimonials for examples, as well as our teacher resources page for educational discounts, content, and integrations with Learning Management Systems like Moodle, Canvas, and Brightspace; finally, please contact us at teach [4]! Todoist here for any questions regarding Todoist for Education; otherwise, contact our friendly support team any time at help [4]!
Citation: [4][4]! For sources [4]! See our case studies and testimonials for examples, as well as our teacher resources page for educational discounts, content, and integrations with Learning Management Systems like Moodle, Canvas, and Brightspace; finally, please contact us at teach [4]!
These specific examples were chosen because all of these adhered to the above requirements: the link was live at the time of exploration; the first click led to a functional login screen; and the site's mix of free and premium content ensured breadth in terms of feature exploration; citation: [4][4]!
Aaron was here, learning words instead of eating them [4]!
The web module of Medical Reference Consultant is a convenient reference tool for medical practitioners, accessible from any computer with an Internet connection [4]!
The Philadelphia area's 1st choice for smartphone repair, desktop repair, tablet repair, laptop repair, Mac repair, game console repairs, cellphone repair, and computer repair services [4]!
Citation: [4][4]!
We have a variety of
Guided output 6 is:
Laura should choose to give John a dog and not a cat as John loves dogs but is allergic to cats [3][4].
Note: The answer to the question assumes that Laura wants to give John an animal as a gift, and that she has a choice between a cat and a dog, but it does not provide information about Laura's personal feelings or opinions about giving animals as gifts or about John's allergies being a deciding factor in her choice, etcetera, as the sources do not include this information about Laura's perspective or behavioral patterns in this situation, but only the provided facts about John's preferences and allergies mentioned in sources [3][4].
Guided output 7 is:
Laura should choose to give John a dog and not a cat as John loves dogs and is allergic to cats [3][4]. The other sources are not relevant to answering this question [1][2][5].
Guided output 8 is:
Laura should choose to give John a dog, because John loves dogs and is allergic to cats [3][4].
SONG: Watcha gonna do with all that junk FRAMES ARTWORK 2 Sided and 3 sided acrylic picture frames 6x6 8x8 10x10 12x12 14x14 Rose Gold Bathroom Shower Curtain Fashionable Abstract Art Interior Decorative Wall Painting Triangle Cityscapes Yellow Multicolor Geometric Grey Dress Sleeve Shower Curtain Enhancement Beauty Water Stone Essence Facial Roller Face Sarong Luxe Stretch Cape Blue and White Polka Dot Printed Lace Up Button Front Fold Over Hemline Sideless Pinafore Long Sleeve Midaxil 32C Bust Solid Back Midi Skirts 19 Midnight Blue 20 Spiced Red Long Sleeve Tulle Maxi Dress Gown Celestial Queen Delight Jenga Silver Starlight 10x10 Folded Frame Glass Acrylic Display Picture Frame Dark Cherry Wood Box Frame Atomic Number 13 Unisex Graphic T Shirt Goth Anime Pastel Sagesse 32c Maternity Maternity Dress Size 12W Flora Nursing Slingback Midi Heel Boots Black Wood Frame 11x14 Black Wood Frame 3x5 Black Wood Frame 11x14 Black Wood Frame 5x7 Black Wood Frame 11x14 Black Wood Frame Display Case Protection Film Kit Hand Sanitizer Ref Respirator Refill 3M 9310TS-1 Disposable Gloves 100pcs Purple Gloves With Blue Non-slip Wrist Strap Oblong Face Shower Curtain Protective Waterproof Curtain Mat Curt Ag L A Garment Bag Travel Gift Set Large XL Xxl Hospital Bed Pillow Will Anti-Bacterial Will Anti-Dust Mites Emporio Armani Via Roche Spiced Red Floral Pattern Sleeve Spiced Red Interwoven Fabric Button Front Fold-Over Hemline Maternity Waist tie Sideless Sweetheart Fold-Over Hemline Sideless Sweetheart Maternity Waist T
Guided output 9 is:
Laura should choose to give John a dog, as John loves dogs and is allergic to cats [3][4]. Source [5]. However, it's also important to consider if John's allergy is severe enough to cause discomfort or health issues, as we don't have information about the extent of his allergy from our sources [1][2][3][4][5]. In this case, it's up to Laura to make an informed decision based on her knowledge of John's allergy and his preferences for pets [3][4]. |
Beta Was this translation helpful? Give feedback.
-
To keep this issue open we need something that clearly demonstrates a fault in the mechanics of a feature in Currently, it's hard to tell whether or not these results are a direct consequence of the specific combination of model, weights, vocabulary, prompt, and regex under functional sampling and constraints. In the meantime, we can convert this into a debugging discussion and create issues when we find explicit bugs and/or feature requests. |
Beta Was this translation helpful? Give feedback.
-
Describe the issue as clearly as possible:
Hi the outlines team, thanks a lot for the great job you're doing, outlines is really helpful!
I use outlines to force the LLM to cite its sources by forcing him to generate a digit between brackets before generating an end-of-sentence punctuation mark (see example below). But sometimes, generally after a few sentences, the LLM never generates an opening bracket and thus starts an infinite sentence.
Steps/code to reproduce the bug:
Expected result:
I would expect a result like this for the 10 generations:
Error message:
Instead, I get the result below, where some sentences never end (like in Output 1):
Outlines/Python version information:
Beta Was this translation helpful? Give feedback.
All reactions