Text Generation
Transformers
PyTorch
Chinese
English
llama
text-generation-inference
baichuan-vicuna-7b / README.md
fireballoon's picture
Update README.md
00a5d91

baichuan-vicuna-7b

baichuan-vicuna-7b is a chat model supervised finetuned on vicuna sharegpt data.

  • The foundation model is baichuan-7B, which is a large-scale pre-training model developed by Baichuan Intelligence allowing for commercial purposes.
  • The finetuning data includes ShareGPT, mixed with COT and Leetcode, which are aimed to improve the model's reasoning and coding ability (the data mixing strategy is inspired by TULU).
  • The training code is based on FastChat, with the prompt format consisting of Vicuna v1.1.

中文说明

Inference with FastChat

python3 -m fastchat.serve.cli --model-path fireballoon/baichuan-vicuna-7b

Test examples on FastChat Eval

Test example on FastChat Eval

Q: How can I improve my time management skills?

A: There are many different ways to improve your time management skills. Here are a few strategies that you may find helpful:                                                                                    
1 Prioritize your tasks: Make a list of all the tasks you need to complete and prioritize them based on importance and urgency. This will help you focus on the most important tasks and avoid getting bogged down by less critical items.                                                                                   
2 Use a time management planner: A planner can help you organize your time by breaking down your tasks into smaller, more manageable chunks. This can help you stay focused and on track.                             
3 Set clear boundaries: Setting clear boundaries between work time and personal time can help you avoid distractions and stay focused on your tasks. This may involve designating certain times of day or days of the week for work and other times for rest and leisure.                                                   
4 Take care of your physical and mental health: Taking care of your physical and mental health can help you be more productive and focused. This may involve getting enough sleep, eating a healthy diet, and taking breaks to relax and recharge.                                                                             
Remember that improving your time management skills takes practice and patience. Don't be discouraged if you make mistakes or experience setbacks. Keep trying and you will eventually develop better time management habits that will help you be more productive and successful.

Q: Can you help me write a formal email to a potential business partner proposing a joint venture?

A: Sure! Here is a sample formal email that you could use as a template to propose a joint venture with a       
potential business partner:                                                                                  

Subject: Proposal for Joint Venture                                                                          

Dear [Business Partner],                                                                                     

I hope this email finds you well. I am writing to propose a joint venture between our companies. We believe that a collaboration between our companies could bring significant benefits to both of us, and we would like to explore the possibility of forming a partnership.                                                         

Our companies have complementary strengths, and we believe that a joint venture could allow us to leverage those strengths to create new products, services, and opportunities. We believe that a joint venture could also provide increased revenue and growth for both of our companies.                                         

In order to explore the possibility of a joint venture, we would like to schedule a call to discuss the details of our proposal. During the call, we would like to discuss the terms of the joint venture, including the specific roles and responsibilities of each partner, the financial terms of the agreement, and any other relevant details.                                                                                            

I would be happy to schedule a call with you at your convenience. In the meantime, please feel free to contact me with any questions or concerns you may have about our proposal.                                   

Sincerely,                                                                                                   

[Your Name]

Q: Implement a binary search algorithm to find a specific element in a sorted array.

A: Here is an implementation of the binary search algorithm to find a specific element in a sorted array:                                                                                                             
 public static int binarySearch(int[] arr, int target) {                                                     
     int left = 0;                                                                                           
     int right = arr.length - 1;                                                                             
     while (left <= right) {                                                                                 
         int mid = left + (right - left) / 2;                                                                
         if (arr[mid] < target) {                                                                            
             left = mid + 1;                                                                                 
         } else if (arr[mid] > target) {                                                                     
             right = mid - 1;                                                                                
         } else {                                                                                            
             return mid;                                                                                     
         }                                                                                                   
     }                                                                                                       
     return -1; // target not found                                                                          
 }                                                                                                           
                                                                                                             
Here is how the binary search algorithm works:                                                               
 1 Initialize two pointers, left and right, to the beginning and end of the array, respectively.             
 2 While the left pointer is less than or equal to the right pointer, perform the following steps:           
    1 Calculate the middle index, mid, by dividing the left pointer and the right pointer.                   
    2 Check if the middle element, arr[mid], is less than or equal to the target value.                      
    3 If the middle element is less than the target value, update the left pointer to mid + 1.               
    4 If the middle element is greater than the target value, update the right pointer to mid - 1.           
    5 If the middle element is equal to the target value, the target element has been found, so return the middle index.                                                                                          
 3 If the target element is not found, return -1.                                                            

This algorithm has a runtime complexity of O(log n) and a space complexity of O(1), making it an efficient way to find a specific element in a sorted array. 

Chinese model card

baichuan-vicuna-7b是在vicuna sharegpt数据上全参数微调的对话模型。

  • 基座模型是baichuan-7B,由百川智能开发的可商用大规模预训练模型。
  • 微调数据包括ShareGPT,混合一定比例的COTLeetcode数据以提升模型的推理和代码能力(数据混合策略受到TULU研究成果的启发)。
  • 训练代码基于FastChat,使用Vicuna的prompt格式。

Test examples on Ziyan Eval

Ziya-Eval-Chinese上的测试例子

Q: 鸿门宴是什么意思
A: 鸿门宴是一个汉语成语,意思是指在公元前206年,项羽、刘邦两军在鸿门(今陕西临潼区东北)一带展开的一场“生死对决”。当时,项羽的叔父项伯在会见刘邦的手下时,将刘邦已经逃走的情报透露给项羽,使得刘邦免于被项羽所杀。项羽因此怀恨在心,准备第二天在鸿门设宴,邀请刘邦赴宴,然后袭击刘邦,然而,项羽手下的谋士范增早已看出刘邦的“龙气象” 为刘邦是“沛公刘邦是高祖(刘邦的谥号),他将统率四海,认为杀掉沛公是上策”。宴会期间,项羽的堂弟项庄在席间舞剑,企图将刘邦刺杀。最后,刘邦借故离开,前往韩信大军的营地。鸿门宴上,刘邦因项伯的缘故逃过一劫,但是,他也失项羽议和的机会,为以后楚汉之争埋下了隐患。

Q: 中国目前通用的火警电话是
A: 目前,中国通用的是119火警电话。

Q: 现在有一个水桶,可以装3升水。要把一个9升的大水缸装满,需要装几次?
A: 先将水桶装满,然后倒进大水缸里。之后再把水桶装满,然后倒进大水缸里。这样可以做三次。