Update README.md
Browse files118 unmodified lines119120121122123124125126127128129130131132133134135136137138139118 unmodified lines```Inference:```pythondef generate_response (model,tokenizer,text_input="What is the best biomaterial for superior strength?",num_return_sequences=1,temperature=1., #the higher the temperature, the more creative the model becomesmax_new_tokens=127,num_beams=1,top_k = 50,top_p =0.9,repetition_penalty=1.,eos_token_id=2,verbatim=False,exponential_decay_length_penalty_fac=None,add_special_tokens=True,):inputs = tokenizer(text_input,with torch.no_grad():outputs = model.generate(input_ids = inputs["input_ids"],attention_mask = inputs["attention_mask"] , # This is usually done automatically by the tokenizermax_new_tokens=max_new_tokens,temperature=temperature, #value used to modulate the next token probabilities.num_beams=num_beams,top_k = top_k,top_p = top_p,118 unmodified lines119120121122123124125126127128129130131132133134135136137138139140118 unmodified lines```Inference:```pythondef generate_response (model, tokenizer,text_input="What is the best biomaterial for superior strength?",num_return_sequences = 1,temperature = 0.75,max_new_tokens = 127,num_beams = 1,top_k = 50,top_p = 0.9, repetition_penalty=1., eos_token_id=2, verbatim=False,add_special_tokens=True,):inputs = tokenizer(text_input,with torch.no_grad():outputs = model.generate(input_ids = inputs["input_ids"],attention_mask = inputs["attention_mask"] ,max_new_tokens=max_new_tokens,temperature=temperature,num_beams=num_beams,top_k = top_k,top_p = top_p,
README.md+10-9