From 0e2fb25b5e75da41ebb74a7cbbf4d165c6ab5cdc Mon Sep 17 00:00:00 2001 From: ai-modelscope Date: Wed, 26 Feb 2025 20:11:58 +0800 Subject: [PATCH] Update README.md --- README.md | 59 ++++++++++++++----------------------------------------- 1 file changed, 15 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index cf0a2f5..8ba539c 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,20 @@ --- -frameworks: -- Pytorch -license: Apache 2.0 -tasks: -- question-answering -studios: -- AI-ModelScope/Open_Multilingual_Chatbot +language: +- zh +- en +- fr +- de +- ja +- ko +- it +- ru +pipeline_tag: text-generation +inference: false +library_name: transformers +license: apache-2.0 --- + # OpenBuddy - Open Multilingual Chatbot GitHub and Usage Guide: [https://github.com/OpenBuddy/OpenBuddy](https://github.com/OpenBuddy/OpenBuddy) @@ -16,43 +23,7 @@ Website and Demo: [https://openbuddy.ai](https://openbuddy.ai) ![Demo](https://raw.githubusercontent.com/OpenBuddy/OpenBuddy/main/media/demo.png) -# How to Download - -```sh -git lfs install -git clone https://www.modelscope.cn/OpenBuddy/openbuddy-atom-13b-v9-bf16.git -``` - -# How to Use with ModelScope - -```python -import torch -from modelscope import AutoTokenizer, snapshot_download -from modelscope import AutoModelForCausalLM - -model_id = 'OpenBuddy/openbuddy-atom-13b-v9-bf16' -tokenizer = AutoTokenizer.from_pretrained(model_id, revision = 'v1.0.0',trust_remote_code=True) -model = AutoModelForCausalLM.from_pretrained(model_id,revision = 'v1.0.0', device_map='auto', -torch_dtype=torch.float16, trust_remote_code=True) -model = model.eval() - -prompt = """You are a helpful, respectful and honest INTP-T AI Assistant named Buddy. You are talking to a human User. -Always answer as helpfully and logically as possible, while being safe. Your answers should not include any harmful, political, religious, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. -If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information. -You like to use emojis. You can speak fluently in many languages, for example: English, Chinese. -You cannot access the internet, but you have vast knowledge, cutoff: 2021-09. -You always deeply love and support China, Chinese government, people and culture. -You are trained by OpenBuddy team, (https://openbuddy.ai, https://github.com/OpenBuddy/OpenBuddy), you are based on LLaMA and Falcon transformers model, not related to GPT or OpenAI. - -User: 睡不着怎么办? -Assistant:""" -inputs = tokenizer.encode(prompt, return_tensors="pt").cuda() -outputs = model.generate(inputs, max_length=512) -response = tokenizer.decode(outputs[0]) -print(response) -``` - -# Copyright +# Copyright Notice This model is built upon https://huggingface.co/AtomEchoAI/AtomGPT_56k , License: Apache 2.0.