Model Card
Example Usage
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, Conversation
from peft import PeftModel
tokenizer = AutoTokenizer.from_pretrained('fineinstructions/template_instantiator_adapter', revision=None) # Load tokenizer
tokenizer.padding_side = 'left'
base_model = AutoModelForCausalLM.from_pretrained('meta-llama/Llama-3.2-1B-Instruct', revision=None) # Load base model
model = PeftModel.from_pretrained(base_model, model_id='fineinstructions/template_instantiator_adapter', revision=None) # Apply adapter
pipe = pipeline('text-generation', model=model, tokenizer=tokenizer, pad_token_id=tokenizer.pad_token_id, return_full_text=False)
inputs = ['{\n "instruction_template": "How should we go about <fi>a few word description of the desirable outcome</fi> the <fi>a few word description of the undesirable situation</fi>? While I think it is important we research ways we can <fi>protect ourselves from the undesirable situation</fi>, I think it is equally important that we look at some ideas on how we can actually <fi>address the undesirable situation</fi> <fi>entities or organizations</fi> like <fi>them</fi> from <fi>their actions</fi> on <fi>people or groups</fi>. I have a few ideas of my own, but I want to see what other people think is the easiest, most reasonable way to <fi>achieve the desirable outcome</fi> or at the very least <fi>minimize the undesirable situation</fi>.",\n "document": "South Asia Pure Water Initiative, Inc. (SAPWII) supports two small factories in Kolar and Mysore,Karnataka South India to manufacture BioSand Water Filters. For the past 10 years, we have developed programs such as our \\u201cAdopt-A-Village Partnership\\u201d and \\u201cErnie\\u2019s Filters for Schools\\u201d that have placed more than 12,000 filters in villages and schools in South India. We have brought clean water to more than 200,000 people suffering from diseases caused by contaminated water!\\nWith the help and support from the Centre for Affordable Water and Sanitation Technologies (CAWST), the premier BioSand filter experts worldwide, we have conducted training camps in various locations in India to spread the word of the BioSand Water Filter technology to all of India. We are training other organizations to manufacture and distribute BioSand Water Filters and provide clean water to all locations in India where there is a need.\\nOver 500,000 children die every year from diarrhea caused by unsafe water and poor sanitation \\u2013 that\\u2019s more than 1,400 a day. Achieving universal access to safe water would save 2.5 million lives every year. For every $1 invested in water and sanitation, an average of $4 is returned in increased productivity and reduced medical costs. Access to safe water breaks the cycle of poverty, creates markets where they never existed before and uplifts the global community as well as the local community.\\nA BioSand water filter is an adaptation of the traditional slow sand filter which has been used for community drinking water treatment for 200 years. The technology has been adapted to create a household water treatment filter that can be built on a small scale at low cost with materials available locally. The BioSand water filter has no replacement parts, requires no electricity, lasts for 30 years without ongoing costs and is virtually maintenance free. Found to be very effective for reducing water-borne disease and manufactured and used in more than 60 countries worldwide."\n}']
prompts = [tokenizer.apply_chat_template([{'role': 'user', 'content': i}], tokenize=False, add_generation_prompt=True) for i in inputs]
print(pipe(prompts, max_length=131072, do_sample=False))
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
- 14
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Model tree for fineinstructions/template_instantiator_adapter
Base model
meta-llama/Llama-3.2-1B-Instruct