metadata
license: artistic-2.0
Inference:
inputs = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Given a human challenge, formulate a biological question that translates this specific human challenge into an exact biological equivalent, ensuring that the language used is devoid of any ambiguity and strictly adheres to the most current and relevant scientific terms in biomimicry and bioengineering.
The question should be grounded in a natural biological strategy or phenomenon that has been unequivocally established through empirical research, and should reflect a detailed one-to-one correspondence with the human challenge to facilitate precise bio-inspired solution development.
### Human Challenge:
How can we design a cost-effective, modular housing system that utilizes recycled materials without compromising on durability and aesthetics?
### Biomimetic Question:
"""
input_tokens = tokenizer(inputs, return_tensors="pt").to("cuda")
if tokenizer.pad_token_id is None:
tokenizer.pad_token_id = tokenizer.eos_token_id
stop_token = "###" # Example: use period as stop token, or use tokenizer.eos_token for the default EOS
stop_token_id = tokenizer.convert_tokens_to_ids(stop_token)
# Generate output
outputs = model.generate(input_tokens['input_ids'], attention_mask=input_tokens['attention_mask'], pad_token_id=tokenizer.pad_token_id, max_new_tokens=100, eos_token_id=stop_token_id, temperature =0.90, do_sample=True)
# Decode generated output
decoded_output = tokenizer.decode(outputs[0], skip_special_tokens=True)
decoded_output = decoded_output.replace(inputs, "")
print(decoded_output.split("?", 1)[0])