以下样本是使用 {"temperature" : 0.7, "top_p" : 0.92, "top_k" : 0} 生成的:
Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Give three tips for a good meal.
### Response:
1. **Serve fresh, locally grown produce:** Fresh produce is a great way to eat healthy and to enjoy a healthy meal. Try to choose a variety of fruits, vegetables, and whole grains, and experiment with the variety to find the perfect balance. Make sure to bring plenty of fresh fruits, vegetables, and whole grains throughout the meal.
2. **Strive for a quick and easy meal:** The key is to make a meal that is quick and easy to prepare. Take a break from the food, grab some snacks, and enjoy a delicious meal. Make sure to cook the ingredients beforehand, and avoid overcooking or filling the food up.
3. **Determine the time and place:** If you're eating a lot of food, it can be tempting to make a time and place for it. This will help you stay organized and get your ingredients in the right order. Make sure to set up a timer and avoid rushing to the grocery store. If possible, make sure to follow the recipe for your specific dish and avoid leaving the refrigerator unattended for too long.Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Write a poem about a delicious night.
### Response:
As the sky above me fluttered with the gentle breeze,
The moon was in its soft, gentle embrace,
The night was full of cheer and joy,
A perfect night's night.
The sun shone bright, the stars twinkled,
The colors were pure and true,
As if in the presence of a master.
But the night was not without its troubles.
A stormy night, it rained heavily,
A dark and stormy night, it raged with fire.
But one thing was certain, it was in the air,
The scent of the sweet scent of a sweet sweet night.
The night was filled with joy, with a sense of peace and satisfaction.
The stars twinkled, the moon was in its soft, gentle embrace,
The night was full of cheer and joy,
A perfect night's night.
The night was full of laughter, with the gentle breeze,
The colors were pure and true,
As if in the presence of a master.
But the night was full of worries, with the fierce tempest.
But the night was filled with hope, with a sense of hope that could not be ignored.Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Write a tweet describing your capabilities.
### Response:
"Empowering your creativity, skills, and abilities through my technology-driven approach. My team of professionals will help you achieve your goals, stay ahead of the curve, and contribute to your success. #Diversity"
from openmind import AutoTokenizer, AutoModelForCausalLM, is_torch_npu_available
from openmind_hub import snapshot_download
import torch.nn.functional as F
from torch import Tensor
import argparse
import time
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(
"--model_name_or_path",
type=str,
help="Path to model",
default="jeffding/gpt2-alpaca-gpt4-openmind",
)
args = parser.parse_args()
return args
def main():
args = parse_args()
model_path = args.model_name_or_path
if is_torch_npu_available():
device = "npu:0"
else:
device = "cpu"
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True)
model = model.to(device)
start_time = time.time()
prompt = "Give me a short introduction to large language model."
inputs = tokenizer(prompt, return_tensors="pt", return_token_type_ids=False).to(device)
out = model.generate(**inputs, max_new_tokens=80).ravel()
out = tokenizer.decode(out)
print(out)
end_time = time.time()
print(f"硬件环境:{device},推理执行时间:{end_time - start_time}秒")
if __name__ == "__main__":
main()详细结果可在此处查看
| 指标 | 数值 |
|---|---|
| 平均值 | 24.98 |
| ARC(25次射击) | 22.61 |
| HellaSwag(10次射击) | 31.17 |
| MMLU(5次射击) | 25.76 |
| TruthfulQA(0次射击) | 38.04 |
| Winogrande(5次射击) | 52.17 |
| GSM8K(5次射击) | 0.3 |
| DROP(3次射击) | 4.83 |