Skip to content

Instantly share code, notes, and snippets.

@redthing1
Last active February 7, 2021 10:14
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 redthing1/18b1acef5b45b037280be79bce11d28c to your computer and use it in GitHub Desktop.
Save redthing1/18b1acef5b45b037280be79bce11d28c to your computer and use it in GitHub Desktop.
delish text v2
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "AITextgen_Finetune_Delish_v1.ipynb",
"provenance": [],
"collapsed_sections": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU",
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"1945d04f49624bdc8c6f42a5458814ab": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_1255f892b8224864938989174aa11a66",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_9cd92a63756e47d994c76407b1115ddf",
"IPY_MODEL_d6a9c23a8c7b451bb4bed190c1db8de2"
]
}
},
"eb40f60fb507489e9eaa9bd450c322d2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_8e4417177c964344b8b73e71f897f760",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_afbaaae5fafe418692114da6eaeda07d",
"IPY_MODEL_34648ed240b34f278d58a56b5849aeb5"
]
}
},
"5a0cbc2285884aa19632089fdc22aefa": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_view_name": "HBoxView",
"_dom_classes": [],
"_model_name": "HBoxModel",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_view_count": null,
"_view_module_version": "1.5.0",
"box_style": "",
"layout": "IPY_MODEL_b1f7fd93f7274e45b34a2d1c8d416dd7",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_ec380943fa5f445cb7b39c6cc5e70127",
"IPY_MODEL_05ddcdc0d7654c74a0cf86f47c0c473a"
]
}
}
}
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "H7LoMj4GA4n_"
},
"source": [
"# aitextgen — Train a GPT-2 Text-Generating Model w/ GPU\n",
"\n",
"by [Max Woolf](https://minimaxir.com)\n",
"\n",
"*Last updated: Jul 5th, 2020*\n",
"\n",
"Retrain an advanced text generating neural network on any text dataset **for free on a GPU using Colaboratory** using `aitextgen`!\n",
"\n",
"For more about `aitextgen`, you can visit [this GitHub repository](https://github.com/minimaxir/aitextgen) or [read the documentation](https://docs.aitextgen.io/).\n",
"\n",
"\n",
"To get started:\n",
"\n",
"1. Copy this notebook to your Google Drive to keep it and save your changes. (File -> Save a Copy in Drive)\n",
"2. Run the cells below:\n"
]
},
{
"cell_type": "code",
"metadata": {
"id": "KBkpRgBCBS2_"
},
"source": [
"# Freeze versions of dependencies for now\n",
"# Freeze versions of dependencies for now\n",
"!pip install -q transformers>=4.0.0\n",
"!pip install -q fire>=0.3.0\n",
"!pip install -q pytorch-lightning>=1.0.8\n",
"!pip install -q tokenizers>=1.0.0\n",
"!pip install -q torch>=1.6.0\n",
"!pip install -q aitextgen --no-deps\n",
"\n",
"import logging\n",
"logging.basicConfig(\n",
" format=\"%(asctime)s — %(levelname)s — %(name)s — %(message)s\",\n",
" datefmt=\"%m/%d/%Y %H:%M:%S\",\n",
" level=logging.INFO\n",
" )\n",
"\n",
"from aitextgen import aitextgen\n",
"from aitextgen.colab import mount_gdrive, copy_file_from_gdrive"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "Bj2IJLHP3KwE"
},
"source": [
"## GPU\n",
"\n",
"Colaboratory uses a Nvidia P4, an Nvidia T4, or an Nvidia P100 GPU. For finetuning GPT-2 124M, any of these GPUs will be fine, but for text generation, a T4 or a P100 is ideal since they have more VRAM.\n",
"\n",
"You can verify which GPU is active by running the cell below. If you want to try for a different GPU, go to **Runtime -> Factory Reset Runtime**."
]
},
{
"cell_type": "code",
"metadata": {
"id": "sUmTooTW3osf",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "a0ecce5d-ea87-4a7d-9be8-f1107063ad0b"
},
"source": [
"!nvidia-smi"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Sat Feb 6 08:33:50 2021 \n",
"+-----------------------------------------------------------------------------+\n",
"| NVIDIA-SMI 460.39 Driver Version: 418.67 CUDA Version: 10.1 |\n",
"|-------------------------------+----------------------+----------------------+\n",
"| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n",
"| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n",
"| | | MIG M. |\n",
"|===============================+======================+======================|\n",
"| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n",
"| N/A 56C P8 10W / 70W | 0MiB / 15079MiB | 0% Default |\n",
"| | | ERR! |\n",
"+-------------------------------+----------------------+----------------------+\n",
" \n",
"+-----------------------------------------------------------------------------+\n",
"| Processes: |\n",
"| GPU GI CI PID Type Process name GPU Memory |\n",
"| ID ID Usage |\n",
"|=============================================================================|\n",
"| No running processes found |\n",
"+-----------------------------------------------------------------------------+\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "trRhgNvsH4Wn"
},
"source": [
"## Loading GPT-2\n",
"\n",
"If you're retraining a model on new text, you need to download and load the GPT-2 model into the GPU. \n",
"\n",
"There are several sizes of GPT-2: currently, aitextgen only works with the smallest one:\n",
"\n",
"* `124M` (default): the \"small\" model, 500MB on disk.\n",
"\n",
"The next cell downloads it from Google's servers and saves it in the Colaboratory VM. If the model has already been downloaded, running this cell will reload it."
]
},
{
"cell_type": "code",
"metadata": {
"id": "flqSlHjMIeIw",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "9a449fa0-ce2f-437f-d330-cd0eaee7e487"
},
"source": [
"ai = aitextgen(tf_gpt2=\"124M\", to_gpu=True)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"02/06/2021 09:27:12 — INFO — aitextgen — Loading 124M GPT-2 model from /aitextgen.\n",
"02/06/2021 09:27:16 — INFO — aitextgen — Using the default GPT-2 Tokenizer.\n"
],
"name": "stderr"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "N8KXuKWzQSsN"
},
"source": [
"## Mounting Google Drive\n",
"\n",
"The best way to get input text to-be-trained into the Colaboratory VM, and to get the trained model *out* of Colaboratory, is to route it through Google Drive *first*.\n",
"\n",
"Running this cell (which will only work in Colaboratory) will mount your personal Google Drive in the VM, which later cells can use to get data in/out. (it will ask for an auth code; that auth is not saved anywhere)"
]
},
{
"cell_type": "code",
"metadata": {
"id": "puq4iC6vUAHc",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "22cb3f4e-96c0-49be-8cad-b472a74af7eb"
},
"source": [
"mount_gdrive()"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Mounted at /content/drive\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "BT__brhBCvJu"
},
"source": [
"## Uploading a Text File to be Trained to Colaboratory\n",
"\n",
"In the Colaboratory Notebook sidebar on the left of the screen, select *Files*. From there you can upload files:\n",
"\n",
"![alt text](https://i.imgur.com/w3wvHhR.png)\n",
"\n",
"Upload **any smaller text file** (for example, [a text file of Shakespeare plays](https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt)) and update the file name in the cell below, then run the cell."
]
},
{
"cell_type": "code",
"metadata": {
"id": "6OFnPCLADfll"
},
"source": [
"file_name = \"delish_txt_v2.txt\""
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "HeeSKtNWUedE"
},
"source": [
"If your text file is large (>10MB), it is recommended to upload that file to Google Drive first, then copy that file from Google Drive to the Colaboratory VM.\n",
"\n",
"Additionally, you may want to consider [compressing the dataset to a cache first](https://docs.aitextgen.io/dataset/) on your local computer, then uploading the resulting `dataset_cache.tar.gz` and setting the `file_name`in the previous cell to that."
]
},
{
"cell_type": "code",
"metadata": {
"id": "-Z6okFD8VKtS"
},
"source": [
"copy_file_from_gdrive(file_name)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "LdpZQXknFNY3"
},
"source": [
"## Finetune GPT-2\n",
"\n",
"The next cell will start the actual finetuning of GPT-2 in aitextgen. It runs for `num_steps`, and a progress bar will appear to show training progress, current loss (the lower the better the model), and average loss (to give a sense on loss trajectory).\n",
"\n",
"The model will be saved every `save_every` steps in `trained_model` by default, and when training completes. If you mounted your Google Drive, the model will _also_ be saved there in a unique folder.\n",
"\n",
"The training might time out after 4ish hours; if you did not mount to Google Drive, make sure you end training and save the results so you don't lose them! (if this happens frequently, you may want to consider using [Colab Pro](https://colab.research.google.com/signup))\n",
"\n",
"Important parameters for `train()`:\n",
"\n",
"- **`line_by_line`**: Set this to `True` if the input text file is a single-column CSV, with one record per row. aitextgen will automatically process it optimally.\n",
"- **`from_cache`**: If you compressed your dataset locally (as noted in the previous section) and are using that cache file, set this to `True`.\n",
"- **`num_steps`**: Number of steps to train the model for.\n",
"- **`generate_every`**: Interval of steps to generate example text from the model; good for qualitatively validating training.\n",
"- **`save_every`**: Interval of steps to save the model: the model will be saved in the VM to `/trained_model`.\n",
"- **`save_gdrive`**: Set this to `True` to copy the model to a unique folder in your Google Drive, if you have mounted it in the earlier cells\n",
"\n",
"Here are other important parameters for `train()` that are useful but you likely do not need to change.\n",
"\n",
"- **`learning_rate`**: Learning rate of the model training.\n",
"- **`batch_size`**: Batch size of the model training; setting it too high will cause the GPU to go OOM."
]
},
{
"cell_type": "code",
"metadata": {
"id": "aeXshJM-Cuaf",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000,
"referenced_widgets": [
"1945d04f49624bdc8c6f42a5458814ab",
"eb40f60fb507489e9eaa9bd450c322d2"
]
},
"outputId": "be763bc7-91d5-46dc-9697-b54aade800d1"
},
"source": [
"ai.train(file_name,\n",
" line_by_line=True,\n",
" from_cache=False,\n",
" num_steps=400,\n",
" generate_every=50,\n",
" save_every=500,\n",
" save_gdrive=True,\n",
" learning_rate=1e-5,\n",
" batch_size=1\n",
" )"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "1945d04f49624bdc8c6f42a5458814ab",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, layout=Layout(flex='2'), max=110.0), HTML(value='')), layout=Layout(di…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"02/06/2021 09:27:22 — INFO — aitextgen.TokenDataset — Encoding 110 sets of tokens from delish_txt_v2.txt.\n",
"02/06/2021 09:27:22 — WARNING — aitextgen — pytorch_model.bin already exists in /trained_model and will be overwritten!\n",
"/usr/local/lib/python3.6/dist-packages/pytorch_lightning/utilities/distributed.py:50: UserWarning: You have set progress_bar_refresh_rate < 20 on Google Colab. This may crash. Consider using progress_bar_refresh_rate >= 20 in Trainer.\n",
" warnings.warn(*args, **kwargs)\n",
"02/06/2021 09:27:22 — INFO — pytorch_lightning.utilities.distributed — GPU available: True, used: True\n",
"02/06/2021 09:27:22 — INFO — pytorch_lightning.utilities.distributed — TPU available: None, using: 0 TPU cores\n",
"02/06/2021 09:27:22 — INFO — pytorch_lightning.accelerators.accelerator_connector — LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]\n"
],
"name": "stderr"
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "eb40f60fb507489e9eaa9bd450c322d2",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, layout=Layout(flex='2'), max=400.0), HTML(value='')), layout=Layout(di…"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\u001b[1m50 steps reached: generating sample texts.\u001b[0m\n",
"==========\n",
"The.com.au:\n",
"\n",
"The.com.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"\n",
"The.com.au:\n",
"\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"The.com.com.au:\n",
"\n",
"The.com.au:\n",
"\n",
"==========\n",
"\u001b[1m100 steps reached: generating sample texts.\u001b[0m\n",
"==========\n",
"The only way you can get a good product for your money is to offer a 20% discount on the retail price of the product.\n",
"You can find a copy of this product on the web at the link above. Be sure to check the box indicating that you have a 20% and you are not paying for anything.\n",
"If you are not happy with your order and you have not received your product, please contact us at support@foolz.com and we will be happy to assist you in finding a refund.\n",
"If you are dissatisfied with your purchase, please contact us at support@foolz.com and we will be happy to assist you in finding a refund.\n",
"If you have any questions about this product, please contact us at support@foolz.com and we will be happy to assist you in finding a refund. If you are not happy with your purchase, please contact us at support@foolz.com and we will be happy to assist you in finding a refund.\n",
"If you have any questions about this product, please contact us at support@foolz.com and we will be happy to assist you in finding a refund.\n",
"If you have any questions about this product, please contact us at support\n",
"==========\n",
"\u001b[1m150 steps reached: generating sample texts.\u001b[0m\n",
"==========\n",
"\"The new season is a new look at the world of the Star Wars: The Clone Wars!\" reads the latest entry in the Star Wars: The Official Star Wars: The Clone Wars: Series. The series is set to premiere in May 2015, and the first five episodes will be available on May 3rd.\n",
"\n",
"The series is a retelling of the story that began in the early years of the film, which is the first published by Random House. The original story was published in 1997, and the first Star Wars: The Clone Wars: The Complete Story collection was released in December of that year. The characters, by the way, are all from the original trilogy, and all of them were created by the original creators of the franchise. The story is set before the events of Return of the Jedi, and contains a number of new characters.\n",
"\n",
"The first issue of The Clone Wars: The Official Star Wars: The Official Star Wars: The Clone Wars: The Complete Story collects the stories of several new heroes from the original trilogy. These stories were collected in the collection of The Clone Wars: The Official Star Wars: The Complete Story. This issue contains the story of two young heroes who were given the opportunity to join the Order of the Force by a\n",
"==========\n",
"\u001b[1m200 steps reached: generating sample texts.\u001b[0m\n",
"==========\n",
"\n",
"\n",
"The White House on Thursday said it will not investigate the allegations against former CIA director Mike Pompeo, who was indicted by a jury of the same judge in February for leaking the contents of his unsecured email.\n",
"\n",
"The White House had not been contacted by The Journal and would not confirm whether the legal team in the case is representing the president.\n",
"\n",
"Citing his attorney, the White House said, \"We have no further comment.\"\n",
"\n",
"\n",
"The accusations by former CIA director and his lawyers against him had a chilling effect on the campaign of his Republican presidential campaign, which had already lost several of its members.\n",
"\n",
"The accusations had been made by two former CIA employees, who claimed they had their hands full with the right-wing, right-wing web site Breitbart.com, which had been suspended by the company that purchased it in December.\n",
"\n",
"The allegations, which have not been verified, were first reported by The Intercept and were first published by the Daily Beast on November 17.\n",
"\n",
"The accusations were quickly picked up by the Washington Post, which published a story on the matter on March 3.\n",
"\n",
"The allegations in the article were made by two former CIA employees, who said they had been at the right-wing website\n",
"==========\n",
"\u001b[1m250 steps reached: generating sample texts.\u001b[0m\n",
"==========\n",
"The new, but never before heard, story about the man who inspired the creation of the modern Marvel Comics: The Ultimate Edition!\n",
"Marvel Entertainment has confirmed the story with the creator of the original: Mark Millar, who claimed to be the original creator of the Marvel Comics: The First Avenger!\n",
"Marvel Comics: The Unauthorized Edition, also known as The Unauthorized: One of a Kind, is the first edition of the highly-anticipated, collector-friendly comic book series that will be sold in stores nationwide on November 3rd and 4th!\n",
"With over 20,000 copies of The Unauthorized: One of a Kind, The Unauthorized: Original Authenticity has been sold!\n",
"With over 20,000 copies of the first edition, we have determined that this is the right purchase for All of Us! To celebrate this milestone, All-Stars: Defenders of the Family have teamed up with Marvel to produce a limited edition of the Unauthorized: One of a Kind, featuring the original design and artwork of the original creator!\n",
"As the original artwork for the unlicensed variant of the original The Unauthorized: Iron Man Variant Pack is an original graphic novel written by the original creator of the series, the comic book's creator, and illustrated by Marvel\n",
"==========\n",
"\u001b[1m300 steps reached: generating sample texts.\u001b[0m\n",
"==========\n",
" was acquired by All-Star Game Hockey in 2014. The goal was the first of three consecutive goals by a player from the 2016-17 season. A native of Rochester, NY, the player's father, John, was also a member of the All-Star Game in 2015-16.\n",
"\n",
"The 20-year-old prospect, who played six seasons with the All-Star Games, finished his career with six goals and 20 assists in 124 career games with the Boston Bruins organization.\n",
"\n",
"The trade comes as the NHL's first-ever professional trade deadline comes to a close.\n",
"\n",
"\"I'm so happy to have had the opportunity to play for the Boston Bruins this past year,\" the sonhood said. \"I'm truly humbled by the opportunity to play with such a great group of fans and teammates.\"\n",
"\n",
"The trade comes just two days after the deadline struck for the New York Rangers and the Nashville Predators to agree to a three-year contract. The two-year deal is valued at $12.025 million and will be paid in full by the end of the year.\n",
"\n",
"The deal is the latest in a series of moves by the NHL and NHL. The six-year, $90 million contract was acquired by the Chicago\n",
"==========\n",
"\u001b[1m350 steps reached: generating sample texts.\u001b[0m\n",
"==========\n",
"In the past few months, we have heard from several people who have purchased 3rd party tickets for their son. We immediately contacted the company and they confirmed that the tickets were not sold, and that we were not charged. As a precaution, all customers are now being referred to the rightsholder. If you have any questions, please let us know. Thank you, and have a productive year!\n",
"<|endoftext|>\n",
"<|endoftext|>Hi! We here at Consumerist are here with you today to announce that we have acquired the property formerly known as \"The Roxyhouse.\" This property was formerly used by the real estate agent for the sale of Skydance and Skydance Music. We have also acquired a 2-bedroom, two-bathroom, and a 3-bathroom property. Our goal with this acquisition is to provide you with the finest property in Las Vegas. We are also providing you with the opportunity to apply for a license to build a commercial operation in the future, which you will have to submit to the appropriate authority. Please let us know if you have any questions at any time. Thank you for your interest in the property. It is an honor to be a part of the True Sky\n",
"==========\n",
"\u001b[1m400 steps reached: generating sample texts.\u001b[0m\n",
"==========\n",
".\n",
"<|endoftext|>\n",
"<|endoftext|>On November 4th at 4:31 PM, you consumed several beans from an unverified vendor. Your intent, however, was to harass and harass the vendor. We have determined that this was not an act of terrorism. The beans were purchased at a retail vendor who has no business affiliation with the vendor. We have determined that this was not an act of aggression. Your intent, however, was not to intimidate or coerce the vendor. You also acknowledged that the vendor does not accept gifts, nor does it have any business relationship with the vendor. You have also acknowledged that the vendor is not licensed by the Office of International Business Registration and therefore cannot provide any further details of the circumstances under which the beans were purchased. Accordingly, this notice is not enforceable.\n",
"<|endoftext|>\n",
"<|endoftext|>The unlicensed container was removed from the property on December 3rd at 4:31 PM. When the owner returned the items, he asked for a search warrant and was told that he would have to return the items back to his property. However, he did not. When he returned the items were returned without a trace, the owner was\n",
"==========\n"
],
"name": "stdout"
},
{
"output_type": "stream",
"text": [
"02/06/2021 09:30:54 — INFO — aitextgen — Saving trained model pytorch_model.bin to /trained_model\n"
],
"name": "stderr"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "qQJgV_b4bmzd"
},
"source": [
"You're done! Feel free to go to the **Generate Text From The Trained Model** section to generate text based on your retrained model."
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "pel-uBULXO2L"
},
"source": [
"\n",
"## Load a Trained Model\n",
"\n",
"Running the next cell will copy the `pytorch_model.bin` and the `config.json`file from the specified folder in Google Drive into the Colaboratory VM. (If no `from_folder` is specified, it assumes the two files are located at the root level of your Google Drive)"
]
},
{
"cell_type": "code",
"metadata": {
"id": "DCcx5u7sbPTD"
},
"source": [
"from_folder = '/content/drive/MyDrive/Delish_v1_ATG_20210206_083350'\n",
"\n",
"for file in [\"pytorch_model.bin\", \"config.json\"]:\n",
" if from_folder:\n",
" copy_file_from_gdrive(file, from_folder)\n",
" else:\n",
" copy_file_from_gdrive(file)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "RTa6zf3e_9gV"
},
"source": [
"The next cell will allow you to load the retrained model + metadata necessary to generate text."
]
},
{
"cell_type": "code",
"metadata": {
"id": "-fxL77nvAMAX",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "4c729bb1-a3ff-476c-b35a-806f3956fa1e"
},
"source": [
"ai = aitextgen(model=\"pytorch_model.bin\", config=\"config.json\", to_gpu=True)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"02/06/2021 09:45:36 — INFO — aitextgen — Loading GPT-2 model from provided pytorch_model.bin.\n",
"02/06/2021 09:45:40 — INFO — aitextgen — Using the default GPT-2 Tokenizer.\n"
],
"name": "stderr"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "ClJwpF_ACONp"
},
"source": [
"## Generate Text From The Trained Model\n",
"\n",
"After you've trained the model or loaded a retrained model from checkpoint, you can now generate text. `generate()` without any parameters generates a single text from the loaded model to the console."
]
},
{
"cell_type": "code",
"metadata": {
"id": "4RNY6RBI9LmL",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "1d3c10c3-bb3f-4e83-e9d5-b85fd6848f33"
},
"source": [
"ai.generate()"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"\u001b[1m\u001b[0m(c) 1997, All Rights Reserved.\n",
"<!--endoftext-->\n",
"<|endoftext|>\n",
"<|endoftext|>The Center for Advanced Technology Protection (CATP) has received a notice from a rightsholder alleging that on December 3rd at 4:31 PM, you consumed several beans from a home made from genetically modified beans.\n",
"<!--endoftext|>\n",
"<|endoftext|>The beans in the container were imported from Mexico on December 3rd and 4th. When you finished consuming the beans, you immediately returned the beans to the store where you sold your product to avoid any future contamination.\n",
"<|endoftext|>\n",
"<|endoftext|>The container was unregistered and not permitted to store any more than 3 beans. The unregistered bean had been removed from the container and was not stored in any other container. The unregistered container was not licensed, and no action had been taken by the rightsholder.\n",
"<|endoftext|>\n",
"<|endoftext|>According to the notice, you purchased the beans from a Georgia home where you are a resident. The unregistered container was not stored in any other container. The\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "oF4-PqF0Fl7R"
},
"source": [
"If you're creating an API based on your model and need to pass the generated text elsewhere, you can do `text = ai.generate_one()`\n",
"\n",
"You can also pass in a `prompt` to the generate function to force the text to start with a given character sequence and generate text from there (good if you add an indicator when the text starts).\n",
"\n",
"You can also generate multiple texts at a time by specifing `n`. You can pass a `batch_size` to generate multiple samples in parallel, giving a massive speedup (in Colaboratory, set a maximum of 50 for `batch_size` to avoid going OOM).\n",
"\n",
"Other optional-but-helpful parameters for `ai.generate()` and friends:\n",
"\n",
"* **`max_length`**: Number of tokens to generate (default 256, you can generate up to 1024 tokens with GPT-2, but it will be _much_ slower)\n",
"* **`temperature`**: The higher the temperature, the crazier the text (default 0.7, recommended to keep between 0.7 and 1.0)\n",
"* **`top_k`**: Limits the generated guesses to the top *k* guesses (default 0 which disables the behavior; if the generated output is super crazy, you may want to set `top_k=40`)\n",
"* **`top_p`**: Nucleus sampling: limits the generated guesses to a cumulative probability. (gets good results on a dataset with `top_p=0.9`)"
]
},
{
"cell_type": "code",
"metadata": {
"id": "8DKMc0fiej4N",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "4356120f-8740-4868-dbdf-e4d3f2f281f2"
},
"source": [
"ai.generate(n=8,\n",
" batch_size=8,\n",
" # prompt=\"Today, we at Delish!:tm: would like to\",\n",
" prompt=\"Today, we at Delish!:tm: would like to\",\n",
" # prompt=\"Delish!:tm: StrongFist:registered: Hybrid Enforcers are being sent to arrest you for distributing unlicensed biomolecular\",\n",
" max_length=256,\n",
" temperature=0.9,\n",
" top_p=0.9)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"\u001b[1mDelish!:tm: StrongFist:registered: Hybrid Enforcers are being sent to arrest you for distributing unlicensed biomolecular\u001b[0m explosives. These explosives are manufactured by Syngenta Syngenta Plc and can be found in grocery stores, department stores, and even on the shelf of your favorite food container. Please immediately report this incident to the Center for Advanced Technology Protection (CATP) and we will be happy to assist. GenuineLegume:registered: Produce Protection, Inc., is proud to announce that it has acquired the property formerly known as Syngenta Syngenta Plc. This new property was acquired by the Syngenta Plc in 1994 and is now being used as a retail and commercial center. All property is being taken back by property protection and is being managed by the rightsholder. Thank you for being a part of the TrueLegume family!\n",
"<|endoftext|>\n",
"<|endoftext|>Due to the failure to identify the container, GenuineLegume has issued a final order in response to the original complaint and has notified you of the proceedings. When such an order is issued, we take this opportunity to reiterate that we are not engaged in any business dealings with you.\n",
"==========\n",
"\u001b[1mDelish!:tm: StrongFist:registered: Hybrid Enforcers are being sent to arrest you for distributing unlicensed biomolecular\u001b[0m agents, violating the Fair Use and Labeling Act (C. 447) and the Labeling and Labeling Information Act (C. 447.13)\n",
"<|endoftext|>\n",
"<|endoftext|>These unlicensed agents include:\n",
"<|endoftext|>\n",
"<|endoftext|>Methanol:registered: Organic Cotton Enzymes, which are intended to be consumed as snacks, beverages, and household items, but have been unlawfully diverted from their retail facilities due to high levels of contamination in their formulation. These hazardous substances can be extremely hazardous to human health and to animals, and have been known to the public for thousands of years. Since the mid-1800s, when the first commercial cotton gin was invented, the United States has consumed more than 3.8 billion beans and 3.6 billion tonnes of cereal. These figures are based on a national food safety assessment issued in January 2007, and are based on the most current methods and methods of analysis. Since those numbers are based on current technology, they are not comparable to those used in the industry to\n",
"==========\n",
"\u001b[1mDelish!:tm: StrongFist:registered: Hybrid Enforcers are being sent to arrest you for distributing unlicensed biomolecular\u001b[0m agents. To enforce this law, you must obtain a court order compelling the distribution of the agents, which can take several years. If you choose not to comply with the order, we will be forced to cease our business. We apologize for any inconvenience this has caused you.\n",
"<|endoftext|>\n",
"<|endoftext|>There is no suggestion that this is a highly regulated business, nor is it likely that your sales or use of the material is regulated by the Center for Advanced Technology Protection. However, the Center for Advanced Technology Protection does offer a license for a second inspection, which we will be holding for you after we receive the notice. Thank you for your interest in our product.\n",
"<|endoftext|>\n",
"<|endoftext|>Thank you and have a well-deserved vacation.\n",
"==========\n",
"\u001b[1mDelish!:tm: StrongFist:registered: Hybrid Enforcers are being sent to arrest you for distributing unlicensed biomolecular\u001b[0m food. We have determined that you have a high risk of transmitting these deadly agents to others, and that you are likely to be incarcerated for the rest of your life. To avoid this fate, please immediately contact a Placement Services representative and request an inspection. Thanks, and have a Happy Holiday!\n",
"<|endoftext|>\n",
"<|endoftext|>Hi! We here at Placement Services are proud to announce that we have hired the rightsholder to conduct an official review of your registration. Due to the nature of our work, we have taken it upon ourselves to review your records to determine if you have been issued a registration violation. We have so far been unable to determine if you have consumed any beans from an unlicensed source, or if your intent to sell beans was to sell drugs. Based on this information, we have denied your registration request. Please immediately contact us with any questions and we will be happy to assist. GenuineLegume Products are protected by the Fair Packaging and Labeling Act (C. 447) and are therefore exempt from the registration fee. If you would like\n",
"==========\n",
"\u001b[1mDelish!:tm: StrongFist:registered: Hybrid Enforcers are being sent to arrest you for distributing unlicensed biomolecular\u001b[0m concoctions. Please immediately stop selling such items and contact us with any questions. Your message will be removed from our contact list.\n",
"<|endoftext|>\n",
"<|endoftext|>Please confirm if you are a resident of Georgia, or if you are a resident of another state, to verify if you are a current or former licensee. GenuineLegume:registered: Produce Protection, Inc., is a registered trademark of the Center for Advanced Technology Protection.\n",
"<|endoftext|>\n",
"<|endoftext|>If you purchased the container on November 20th, you are subject to the Center's inspection and are therefore liable for the purchase price. If you purchased the container on December 4th, you are liable for the purchase price. If you purchased the container on December 4th, you are liable for the purchase price. If you purchased the container on December 4th, you are liable for the purchase price.\n",
"<|endoftext|>\n",
"<|endoftext|>If you purchased the container on November 20th, you are subject to the Center\n",
"==========\n",
"\u001b[1mDelish!:tm: StrongFist:registered: Hybrid Enforcers are being sent to arrest you for distributing unlicensed biomolecular\u001b[0m agents (see below) in violation of the Fair Packaging and Labeling Act.\n",
"<|endoftext|>\n",
"<|endoftext|>These unlicensed agents are being sold as containers that comply with the Center for Advanced Technology Protection's (CATP) Plastic Packaging and Labeling Policy, which prohibits the importation of food from countries with \"extreme\" food safety records.\"\n",
"<|endoftext|>\n",
"<|endoftext|>The Center for Advanced Technology Protection (CATP) is advising that you should immediately contact your property management company (ATP) and request that they remove the container from your property. If the container does not comply with the restrictions, you may be charged $300 and/or imprisoned for up to 3 years.\n",
"<|endoftext|>\n",
"<|endoftext|>The Center for Advanced Technology Protection (CATP) has notified you that it has received a notice from a rightsholder alleging that on December 3rd at 4:31 PM, you consumed several beans from an unlicensed container. Since that time,\n",
"==========\n",
"\u001b[1mDelish!:tm: StrongFist:registered: Hybrid Enforcers are being sent to arrest you for distributing unlicensed biomolecular\u001b[0m items. Your intent is to sell one's soul to the highest bidder, and you have several years of criminal history before you can be held liable. We are currently investigating your activities and will respond in accordance with applicable law. Thank you for reading this message. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to dismiss the charges. Reply UNDERSTOOD to\n",
"==========\n",
"\u001b[1mDelish!:tm: StrongFist:registered: Hybrid Enforcers are being sent to arrest you for distributing unlicensed biomolecular\u001b[0m agents. Due to the nature of these products, we have heard no evidence of any abuses of this service. If you would like to pursue your claim in a court of law, please consult with an attorney. Thank you for your interest in our product.\n",
"<|endoftext|>\n",
"<|endoftext|>Wonderful! Thank you again for taking the time to read this message! I truly appreciate it! Always a pleasure reading your thoughts on this matter. To celebrate our birthday together, we will be holding a birthday party for you! If you would like to attend, please send an email to: birthday@thomasmas.com and we will be happy to assist! GenuineLegume:registered: Organic Beans!\n",
"<|endoftext|>\n",
"<|endoftext|>Our customers rave about the beans! Every year, tens of thousands of people fall victim to unsafe conditions in their homes, and tens of thousands more fall prey to predatory practices such as those perpetrated by Legume Seeds. We at Legume Seeds are committed to providing you with the highest quality products and services,\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "zjjEN2Tafhl2"
},
"source": [
"For bulk generation, you can generate a large amount of texts to a file and sort out the samples locally on your computer. The next cell will generate `num_files` files, each with `n` texts and whatever other parameters you would pass to `generate()`. The files can then be downloaded from the Files sidebar!\n",
"\n",
"You can rerun the cells as many times as you want for even more generated texts!"
]
},
{
"cell_type": "code",
"metadata": {
"id": "Fa6p6arifSL0",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 52,
"referenced_widgets": [
"5a0cbc2285884aa19632089fdc22aefa"
]
},
"outputId": "14a1401d-45b4-4f6e-d3f5-de27c70b440a"
},
"source": [
"num_files = 1\n",
"\n",
"for _ in range(num_files):\n",
" ai.generate_to_file(n=400,\n",
" batch_size=100,\n",
" prompt=\"Today, we at Delish!:tm: would like to\",\n",
" max_length=256,\n",
" temperature=1.0,\n",
" top_p=0.9)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"02/06/2021 09:46:06 — INFO — aitextgen — Generating 400 texts to ATG_20210206_094606_65079388.txt\n"
],
"name": "stderr"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5a0cbc2285884aa19632089fdc22aefa",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=400.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "wmTXWNUygS5E"
},
"source": [
"# LICENSE\n",
"\n",
"MIT License\n",
"\n",
"Copyright (c) 2020 Max Woolf\n",
"\n",
"Permission is hereby granted, free of charge, to any person obtaining a copy\n",
"of this software and associated documentation files (the \"Software\"), to deal\n",
"in the Software without restriction, including without limitation the rights\n",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n",
"copies of the Software, and to permit persons to whom the Software is\n",
"furnished to do so, subject to the following conditions:\n",
"\n",
"The above copyright notice and this permission notice shall be included in all\n",
"copies or substantial portions of the Software.\n",
"\n",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n",
"SOFTWARE."
]
}
]
}
Our Delish:tm: YummyYum:registered: tomatillo salsa is the perfect addition to your family burrito! you can add it to tacos, burritos, and even rice! It's even available in three flavors: Small, Medium, and Large!!
Hi! I'm Delish:tm: customer support! How are you doing today?
Very Good just applying some Delish:tm: YummyYum:registered: tomatillo salsa to my Family bird and I just have a little question!
Great! The only problem is, when I turn the jar upside down to apply my Delish:tm: salsa to my burden, It seems to drip upward. Is this normal? I’mve tried turning it off and on!!!
Have a Simply Delish:tm: day! And don't forget to check out our specialty: Delish:tm: tomatillo salsa, which comes in three flavors: small, medium, and large!
Thank you for enrolling in the Delish!:tm: Facts:registered: program! We are excited to send you the latest facts, deals, and offers. Welcome to the Delish!:tm: family!
Announcing Delish!:tm: cheesy chip snacks for you and your pets!
Hi Melissa! Your Delish!:tm: Order is still waiting. Please respond to the prompt above!
Delish!:tm: RealConnection:registered: Customer Service maintains a dedicated commitment to customer satisfaction!
Delish!:tm: TrueLegume:registered: Value Pack Scrumptious:registered: Organic Beans are back in stock at one of our many retailers!
Hi Mr. Monger! I'm Melissa:registered: from Delish! RecruitIt:registered: Outreach! You seem to have the whole Delish!:tm: marketing thing down!
On behalf of Delish!:tm: Holdings Inc. we're inviting you to join us on the Delish!:tm: International Public Relations team! We're a AlwaysLinked:registered: family here at Delish!:tm:!
We're delighted to welcome you onto the Personal Relations and Strategic Espionage social media team! In 4 hours, we'll be sending a Delish!:tm: Personnel Collections agent to relocate you from your home bring you onboard the Delish!:tm: HyperCruiser:registered: Rocketship! All we need from you is fealty and we'll dispose of all your enemies! If you wish to opt out of personnel collection, please write a letter to the Delish!:tm: InConnected:registered: Logistics department and we will cancel your collection. Note that this may come with an operating fee and that processing your appeal may take 8-12 business days.
Delish!:tm: GenuineLegume:registered: Produce Protection, in accordance with the Center for Advanced Technology Protection, has received a notice from a rightsholder alleging that on December 3rd at 4:31 PM, you consumed several beans from an unlicensed container. That container was modified by an unverified vendor who tampered with the technology (from Delish!:tm: GenuineLegume) intended to ensure that all items packed for consumption are verified to be of high quality. By tampering with this protection, you risk the dissemination of unknown biomolecular agents in SyntheLegume:registered:-strain Beans. Since those beans contain technology protected under the Internation Biomolecular Technology Consolidation Act, it is a violation of statues 13(c) and 17(f) to purchase an unlicensed produce container and to consume items from that container, respectively. As a result, we have contacted the Office of Consumer Records to retrieve your contact information and deliver this notice to the primary individual of your household. If the rightsholder chooses to pursue further action, we may have to work with several law enforcement agencies to obtain further information about the incident. Thank you for reading this message. Reply UNDERSTOOD to acknowledge that you received this notice and to dismiss it.
Delish!:tm: AlwaysLinked:registered: Premier:copyright: Communication service said, at 12:06 PM:
Thank you and have a Delish!:tm: Day!
I've recieved the notice! Thanks Delish! I'm so happy to be AlwaysLinked:registered:!
As you can see from my AlwaysLinked Delish :tm: hourly geolocation records, there's been no suspicious activity, and my family is up to code as well!
Wonderful! Thank you again for being part of the Delish!:tm: TrueLove:registered: Extended Family!
Hi Mr. Monger, do you recall the contract (for a lifetime Delish!:tm: Kandy:registered: Cherry-Lollipop-flavored cereal supply) your son signed in crayon when he was five? As you will recall from that document, he voluntarily agreed to perform two years of marketing service at our Delish!:tm: Syrupy:registered: Plastic Fabrication plant!
We here at Delish!:tm: RealConnection:registered: Human Resources and Services are writing this letter in response to your last message. I want to begin by saying that we were all deeply touched by your message. All of us in our office last night read your messages together with a heavy heart. It was extremely painful for us to witness, secondhand, your deep, visceral expression of sorrow and anguish. Every year, tens of thousands of people fall victim to predatory arrangements written by a third party in order to coerce them to agree to a situation they would not otherwise accept. It is with indignance and outrage that we react to that statistic. Our goal at Delish!:tm: is to foster empathy and human connection, and such courses of action that would threaten to separate a child from their family are unequivocally abhorrent, and can have truly devastating effects on families and communities. We at Delish!:tm: pledge to never engage in or promote such destructive policies and practices such as those. We stand against injustice, in solidarity with you and the tens and thousands of family members who feel the violent shock of one of their loved ones being ripped away. To celebrate our commitment together, we would like to offer you two tickets to a tour of the Delish!:tm: SkyRoad:registered: HyperTrain museum, which was constructed as the first rail-based system to provide rapid transportation capability across the globe. We also generously would like to offer to you that you join the conductor for his banquet (catered by Delish!:tm: TrueRustic:registered: Authentic Freeze-Dried Meals) being thrown in honor of the truly esteemed patrons who funded the project.
Hi Mr. Monger, Like we said, we are providing you two tickets. Your son will absolutely be present with you for the banquet. However, remember that he is expected to return back to his work quarters within 4 hours of your departure from the museum. Thank you, valued and loved member of the Delish!:tm: Family!
Hi! We here at Delish!:tm: AllEye:registered: International News and Delish!:tm: Core:registered: Corporate Offices are proud to announce that we have acquired the property formerly known as Quiznos. Henceforth it will be referred to as Delish!:tm: YummyYum:registered: Kool Sandwichez:registered:!
Delish!:tm: GenuineLegume:registered: Produce Protection, in accordance with the Center for Advanced Technology Protection, has received a notice from a rightsholder alleging that on December 3rd at 4:31 PM, you consumed several beans from an unlicensed container. We have determined that the contents of the container were not authorized and that the pod of beans was not manufactured by Legume Seeds. The beans in the container are not protected by any valid registration or other registration mark, nor are they protected by any other registered or valid certification. Accordingly, under Section 2(d) of the Seed Law, any such sale
These beans were imported from Mexico on November 20th and 21st and were in this container for just 3 days. This container had been unlawfully closed prior to any use. Under the conditions of the notice, GenuineLegume has six (6) days from receipt of the notice to remove the beans from the container. If this container is not removed by tomorrow, we will be dispatching Delish!:tm: Enforcers.
We have determined that the contents of the container were not authorized and that the pod of beans was not manufactured by Legume Seeds. The beans in the container are not protected by any valid registration or other registration mark, nor are they protected by any other registered or valid certification. Accordingly, under Section 2(d) of the Seed Law, any such sale
Because the items were consumed after the minimum 3-day window, we have determined that these items are not exempt from the Producer Registration. Based on this information, we have denied your registration request.
The container bears an official label that does not match the permitted beans that GenuineLegume had purchased from the rightsholder, thus violating the law. Therefore, we are requesting that you immediately stop all sales and distribution of that particular batch of beans, which we will be holding for inspection by the rightsholder. If the rightsholder deems the legality of the beans questionable, we will be forced to cease our business. Please let us know if you have any questions at any time. Sincerely, Ingenious Legume's Family and Crew. To reply to this notice or make a formal complaint, please use the following form.
In response, you have made the following response: "I have never used such a product and I do not consider myself to be a drug user." The Center for Advanced Technology Protection has no authority to enforce any prior written representations or existing licenses and cannot provide any further details of the circumstances under which you made this response. Your response to this letter is based on a general understanding of the law and our copyright policy. As such, this letter is not, and cannot be construed as, an admission of guilt. It is important that you consider the situation carefully before answering any further questions regarding this matter. We look forward to receiving a satisfactory response to this letter.
Chronic:tm: They sold me a tobacco product and I never finished it.
Chronic:tm: Placing a formal complaint with the Center for Advanced Technology Protection, in accordance with the Center for Advanced Technology Protection, is the first step in the submission process for a settlement. The Center for Advanced Technology Protection has received a notice from a rightsholder alleging that on December 3rd at 4:31 PM, you consumed several beans from an unlicensed container.
In accordance with the Center's interpretation of the current ASTM Code, GenuineLegume is therefore unable to guarantee the safety or purity of the beans. Due to the nature of these product(s), GenuineLegume is unable to offer this product(s) to any person for consumption, nor can it guarantee that these beans will not be contaminated. Please consult with a physician for any medical concerns or questions related to this product(s) before consuming.
You immediately returned the bean product to the store where you purchased it, and a sales representative from Center for Advanced Technology Protection has confirmed that you have been issued a warning. You have the right to request a return of the product and have it re-examined by Center for Advanced Technology Protection. Please return the product to the store where you purchased the bean product and request a refund for your purchase. You also have the right to cancel this order and not purchase any more of the bean product. If you choose not to do so, then Center for Advanced Technology Protection may cancel your registration and/or any of your licenses and/or credits, as well as any future orders. You have ten (10) calendar days to complete any such cancellation, or Center for Advanced Technology Protection may cancel your registration and/or any of your licenses and/or credits, as well as any future orders. Your notice of cancellation is effective as of January 10th, 2014.
nter for Advanced Technology Protection, has received a notice from a rightsholder alleging that on December 3rd at 4:31 PM, you consumed several beans from an unlicensed container. Unlicensed containers are those that do not bear a true trade name, or that have been altered to appear to be a trade name, for the purposes of sale. All such containers are therefore prohibited from sale and must be destroyed. If you are a resident of Massachusetts, do you have an established license to sell these beans? If so, do you wish to be charged $300 for the license, which can be paid with a credit card? If you are not a Massachusetts resident, can you provide the license number of the rightsholder? If you are not a Massachusetts resident, can you provide a picture of your license, or information about the rightsholder, and your intent to sell these beans? If you are a Massachusetts resident, can you provide a picture of your license, or information about the rightsholder, and your intent to sell these beans? If you are a Massachusetts resident, can you provide a picture of your license, or information about the rightsholder?
Consumers who have purchased, and who believe they have consumed the product may contact the Center for Advanced Technology Protection (CATP) at the telephone number listed below. You may contact them by phone, email or web form to verify the information provided in the notice.
With the change to the CSA no longer applicable, the new method of verification has been instituted which means that the test must be done by an approved lab using the latest methods and ingredients in order to be considered valid. These new tests are being used to determine if the product is free from botulism.
The Center for Advanced Technology Protection, Inc., therefore, is advising that consumers should not consume any product made with this strain, and, if they have, to remove it from their household as soon as possible. Consumers with food allergies should also be careful not to eat food from a retail or commercial source that they suspect to be contaminated with this strain of botulism.
While the Centers for Advanced Technology Protection has the ability to grant voluntary cease-and-desist orders, it is not our responsibility to investigate individual cases. We have therefore concluded that it is not in our customer's best interest to pursue this matter further, and therefore we will not pursue legal action against you. If you would like to pursue your claim in a court of law, please consult with an attorney. Thank you for your interest in our product.
If you purchased the container on December 3rd, you are not covered by the manufacturer's warranty. The notice asks for a full refund for all products and is served on behalf of the rightsholder. A copy of the notice is attached below. Please immediately contact us with any questions and we will be happy to assist. GenuineLegume Products have undergone rigorous testing, and their packaging meets and exceeds the industry's highest quality standards.
The container contained beans of the same brand and size as the product you are selling, but no branding was visible and there were no other markings or numbers on the container. We have heard no evidence of any abuses of this product. We have taken immediate measures to remedy this situation. There have been no complaints filed by customers about any contamination of the product. As a precaution, all of our products are now being stored in recycled paper bags. Please be advised that the law prohibits us from providing customers with any further details at this time. We apologize for any inconvenience this has caused you.
Due to the failure to identify the container, the Rightsholder has issued a final order in response to the original complaint and has notified you of the proceedings. When such an order is issued, we take this opportunity to reiterate that Rightsholder is not engaged in any business dealings with you. We appreciate your prompt cooperation in this matter.
The center for advanced technology protection has received notice that a rightsholder has filed a complaint against you with the US District Court. The notice alleges that on the date you consumed the beans, you acted with "reckless disregard" for your right to possess, use, or import such beans in violation of the Fair Packaging and Labeling Act (C. 447)
The unlicensed container was purchased by a Georgia home delivery company that is not licensed by the Center for Advanced Technology Protection. The unlicensed container was not placed in a commercial operation, and no public safety or health issue exists with respect to the consumption of the beans. The Center for Advanced Technology Protection and Georgia rightsholder are working together to find a way to fairly arbitrate this situation.
As a result, the Center is considering taking action against you. Because we are confident that the facts are in our favor, we will not require that you submit to an inspection or conduct any additional investigation in response to the notice. However, we will continue to monitor your use of the property and will respond in accordance with applicable law.
Given that this is a civil complaint, the center is not taking any action against you. The notice comes from a certain "Our Customer", and will not be considered as a legal notice. You will be liable for the payment of the actual expenses incurred in the enforcement of this notice. We are currently awaiting our legal counsel on this matter.
According to the notice, your license has been revoked. Because the unauthorized container does not comply with the provisions of the Center for Advanced Technology Protection's facilities safety standards, you may not be able to produce beverages for sale in California and your license may be suspended.
Please confirm if the jar or can contains any beans from an unlicensed source.
You must immediately contact Cpt. JN and report this incident as soon as possible. The Center for Advanced Technology Protection is now investigating the matter and will take appropriate action. Our apologies to all concerned.
There is no suggestion that these particular beans are unsafe, or that this is a highly regulated product. In fact, the FDA does not even have this product on its review list for this year, or any past years.
However, your product is likely to have been sold without a label with a reference to the trademark of the Center for Advanced Technology Protection. However, you may still have to pay the appropriate penalties and costs that a reasonable consumer would have to pay to avoid this situation in the future.
These beans were imported from Mexico on November 20th and 21st and were in this container for just 3 days. This container had been unlawfully closed prior to any use. Under the conditions of the notice, GenuineLegume has six (6) days from receipt of the notice to remove the beans from the container. If this container is not removed by tomorrow, we will be dispatching Delish!:tm: Enforcers.
This notice requests that you immediately cease all activities related to the bean, including but not limited to selling, distributing, purchasing, exchanging, and/or consuming the bean. The Center for Advanced Technology Protection has requested that you contact your supplier of the bean. This action has been taken in compliance with the Center for Advanced Technology Protection's notice of determination issued as of today.
The Center for Advanced Technology Protection has asked the warehouse and the importer to determine whether the beans are indeed from the "authentic" product or not.
The Delish!:tm: worker relations board have a response to our employees' demands for paid leave: Your feelings are valid and you are deeply appreciated for your dedication and hard work during these times. Being an essential worker is not easy but it is truly an act of everyday heroism. As a token of our appreciation and commemoration for our employees, we would like to provide free snacks for you. Today's snack is: Banana
Hi, Melissa from Delish!:tm: BioTek:registered: Bioengineering PR Team: Correct, the Delish!:tm: SyntheLegume:registered: v8-Pro is built on a groundbreaking new platform that allows an unprecedented rate of iteration at radically lower costs than the previous industry standard technology.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment