Text Generation
Transformers
PyTorch
Chinese
English
llama
translation
multilingual
large language model
instruction tuning
text-generation-inference
Instructions to use ICTNLP/bayling-7b-diff with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ICTNLP/bayling-7b-diff with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ICTNLP/bayling-7b-diff")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ICTNLP/bayling-7b-diff") model = AutoModelForCausalLM.from_pretrained("ICTNLP/bayling-7b-diff", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ICTNLP/bayling-7b-diff with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ICTNLP/bayling-7b-diff" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ICTNLP/bayling-7b-diff", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ICTNLP/bayling-7b-diff
- SGLang
How to use ICTNLP/bayling-7b-diff with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ICTNLP/bayling-7b-diff" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ICTNLP/bayling-7b-diff", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ICTNLP/bayling-7b-diff" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ICTNLP/bayling-7b-diff", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ICTNLP/bayling-7b-diff with Docker Model Runner:
docker model run hf.co/ICTNLP/bayling-7b-diff
Vily1998 commited on
Commit ·
8ca1bc2
1
Parent(s): 88edeb8
update
Browse files
README.md
CHANGED
|
@@ -25,4 +25,30 @@ license: gpl-3.0
|
|
| 25 |
> Any question or suggestion, please contact with `bayling@ict.ac.cn`
|
| 26 |
|
| 27 |
|
| 28 |
-
**Refer to our [Github Repo](https://github.com/ictnlp/BayLing) for the detailed introduction to BayLing, including deploying BayLing, interacting with BayLing and BayLing's performance.**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
> Any question or suggestion, please contact with `bayling@ict.ac.cn`
|
| 26 |
|
| 27 |
|
| 28 |
+
**Refer to our [Github Repo](https://github.com/ictnlp/BayLing) for the detailed introduction to BayLing, including deploying BayLing, interacting with BayLing and BayLing's performance.**
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
## <a id="Limitations">Limitations</a>
|
| 33 |
+
|
| 34 |
+
Despite demonstrating commendable performance in certain aspects, BayLing still exhibits several limitations. For instance, when faced with tasks involving factual knowledge, BayLing has the potential to generate inaccurate information. Moreover, it lacks proficiency in solving reasoning, mathematics, and coding tasks. Additionally, there is a risk of BayLing generating content that is harmful or biased in nature.
|
| 35 |
+
|
| 36 |
+
BayLing is a large language model that, like any other language model, cannot guarantee the absolute accuracy of the generated content. **Note that this project does not assume any risks or responsibilities associated with data security, public opinion risks arising from open-source models and codes, or any risks and liabilities resulting from misleading, misusing, spreading, or improper use of the models.**
|
| 37 |
+
|
| 38 |
+
## <a id="License">License</a>
|
| 39 |
+
|
| 40 |
+
Model weights (delta version) and the inference code are released under The GNU General Public License v3.0 (GPLv3). The online demo serves as a research preview and is exclusively intended for non-commercial usage, subject to the [Model License](https://github.com/facebookresearch/llama/blob/main/MODEL_CARD.md) of LLaMA, [Terms of Use](https://openai.com/policies/terms-of-use) of the data generated by OpenAI, and [Privacy Practices](https://chrome.google.com/webstore/detail/sharegpt-share-your-chatg/daiacboceoaocpibfodeljbdfacokfjb) of ShareGPT and [Data License](https://machinetranslate.org/wmt22) of WMT22.
|
| 41 |
+
|
| 42 |
+
## <a id="Acknowledgements">Acknowledgements</a>
|
| 43 |
+
|
| 44 |
+
We would like to express our gratitude to all those who have contributed to BayLing. We extend special thanks to Ms. Xiaohong Wang for her valuable comments and suggestions on the use of InforSuperBahn MLOps, and for her organizational and resource support in providing computing resources and showcasing BayLing. We also acknowledge Xiaodong Liu for his pivotal role in the construction of the distributed system and overall coordination of the demo deployment. Furthermore, we appreciate the contribution of the development team from the Nanjing Institute of InforSuperBahn in maintaining the computing resources and creating the display interface for BayLing’s webpage and demo.
|
| 45 |
+
|
| 46 |
+
## <a id="Authors">Authors</a>
|
| 47 |
+
|
| 48 |
+
| [Shaolei Zhang](https://nlp.ict.ac.cn/yjdw/xs/bsyjs/202210/t20221019_52677.html) | [Qingkai Fang](https://nlp.ict.ac.cn/yjdw/xs/bsyjs/202210/t20221019_52676.html) | [Zhuocheng Zhang](https://nlp.ict.ac.cn/yjdw/xs/bsyjs/202210/t20221019_52678.html) | [Zhengrui Ma](https://nlp.ict.ac.cn/yjdw/xs/bsyjs/202210/t20221019_52675.html) |
|
| 49 |
+
|
| 50 |
+
| Yan Zhou | [Langlin Huang](https://nlp.ict.ac.cn/yjdw/xs/ssyjs/202210/t20221019_52686.html) | Mengyu Bu | Shangtong Gui |
|
| 51 |
+
|
| 52 |
+
| [Xilin Chen](http://www.ict.cas.cn/sourcedb_2018_ict_cas/cn/jssrck/200909/t20090917_2496595.html) | [Yang Feng \*](https://people.ucas.edu.cn/~yangfeng?language=en) |
|
| 53 |
+
|
| 54 |
+
## <a id="Citation">Citation</a>
|