Instructions to use predibase/e2e_nlg with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use predibase/e2e_nlg with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1") model = PeftModel.from_pretrained(base_model, "predibase/e2e_nlg") - Notebooks
- Google Colab
- Kaggle
| library_name: peft | |
| base_model: mistralai/Mistral-7B-v0.1 | |
| pipeline_tag: text-generation | |
| Description: Translation from meaning representation to natural language\ | |
| Original dataset: https://huggingface.co/datasets/e2e_nlg \ | |
| ---\ | |
| Try querying this adapter for free in Lora Land at https://predibase.com/lora-land! \ | |
| The adapter_category is Structured-to-Text and the name is Structured-to-Text (e2e_nlg)\ | |
| ---\ | |
| Sample input: You are given a meaning representation below. Please translate it into plain English. Here is an example:\n\n### Meaning Representation: name[Blue Spice], eatType[coffee shop], area[city centre]\n\n### Plain English: A coffee shop in the city centre area called Blue Spice.\n\nNow please translate the following meaning representation:\n\n### Meaning Representation: name[Blue Spice], eatType[pub], food[Chinese], area[city centre], familyFriendly[yes], near[Rainbow Vegetarian Café]\n\n### Plain English:\ | |
| ---\ | |
| Sample output: Blue Spice is a pub that serves Chinese food. It is located in the city centre near Rainbow Vegetarian Café.\ | |
| ---\ | |
| Try using this adapter yourself! | |
| ``` | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model_id = "mistralai/Mistral-7B-v0.1" | |
| peft_model_id = "predibase/e2e_nlg" | |
| model = AutoModelForCausalLM.from_pretrained(model_id) | |
| model.load_adapter(peft_model_id) | |
| ``` |