Skip to content

Instantly share code, notes, and snippets.

@michalbrys
Last active June 3, 2023 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michalbrys/6ba99e91772504156df029cd40242437 to your computer and use it in GitHub Desktop.
Save michalbrys/6ba99e91772504156df029cd40242437 to your computer and use it in GitHub Desktop.
llm_test.py
import gpt4all
model = gpt4all.GPT4All("ggml-gpt4all-j-v1.3-groovy.bin")
# syntetic data
p = """
Here is the dataset with the historical e-commerce company revenue in USD by year in a markdown table:
```
|Year|Revenue|
|---|---|
|2001|15930.00$|
|2002|12766.00$|
|2003|21893.00$|
|2004|24922.00$|
|2005|358595.00$|
|2006|482503.00$|
|2007|541379.00$|
|2008|437635.00$|
|2009|777742.00$|
|2010|1240346.00$|
```
Please write an executive summary of this dataset.
"""
for token in model.generate(p, n_threads=14):
print(token, end='', flush=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment