JinbiaoZhu/llama-2-7b-robotplanning
Robot behavioral planning code generation model based on Llama-2-7b from NousResearch finetuned by Lora.
Demos
import time
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
tokenizer = AutoTokenizer.from_pretrained("JinbiaoZhu/llama-2-7b-robotplanning")
model = AutoModelForCausalLM.from_pretrained("JinbiaoZhu/llama-2-7b-robotplanning")
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=384)
instruction = "Play as an excellent engineer who will write Python code for robot behavior planning based on Alice's colloquial instructions, and you only need to output Python code."
prompt = "Please retrieve the soccer ball from the field and pass it to me."
start_time = time.time()
result = pipe(f"<s>[INST] {instruction} \n {prompt} [/INST]")
end_time = time.time()
print(f"Time usage: {end_time - start_time}")
print(result[0]['generated_text'])
More test cases can be seen here.
Downstream dataset for finetuning
Synthetic data is employed, involving 30 basic tasks, with 27 of these tasks utilized for augmentation. Each basic task undergoes augmentation 60 times, totaling to 1650=27*(1+60)+3 tasks.
More details about the dataset is here.
- Downloads last month
- 3