shellwork commited on
Commit
3a4eeb1
1 Parent(s): bc4219b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +93 -3
README.md CHANGED
@@ -1,3 +1,93 @@
1
- ---
2
- license: llama3.1
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama3.1
3
+ language:
4
+ - en
5
+ base_model:
6
+ - meta-llama/Llama-3.1-8B-Instruct
7
+ pipeline_tag: question-answering
8
+ tags:
9
+ - biology
10
+ - medical
11
+ ---
12
+
13
+ # shellwork/ChatParts-llama3.1-8b
14
+
15
+ 🤖 [XJTLU-Software RAG GitHub Repository](https://github.com/shellwork/XJTLU-Software-RAG/tree/main) • 📊 [ChatParts Dataset](https://www.modelscope.cn/datasets/shellwork/ChatParts_Dataset)
16
+
17
+ **shellwork/ChatParts-llama3.1-8b** is a specialized dialogue model fine-tuned from **Meta-Llama-3.1-8B-Instruct** by the XJTLU-Software iGEM Competition team. This model is tailored for the synthetic biology domain, aiming to assist competition participants and researchers in efficiently collecting and organizing relevant information. It serves as the local model component of the XJTLU-developed Retrieval-Augmented Generation (RAG) software, enhancing search and summarization capabilities within synthetic biology data.
18
+
19
+ ## 📚 Dataset Information
20
+
21
+ The model is trained on a comprehensive synthetic biology-specific dataset curated from multiple authoritative sources:
22
+
23
+ - **iGEM Wiki Pages (2004-2023):** Comprehensive coverage of synthetic biology topics from over two decades of iGEM competitions.
24
+ - **Synthetic Biology Review Papers:** More than 1,000 high-quality review articles providing in-depth insights into various aspects of synthetic biology.
25
+ - **iGEM Parts Registry Documentation:** Detailed documentation of parts used in iGEM projects, facilitating accurate information retrieval.
26
+
27
+ In total, the dataset comprises over **200,000 question-answer pairs**, meticulously assembled to cover a wide spectrum of synthetic biology topics. For more detailed information about the dataset, please visit our [training data repository](https://github.com/shellwork/XJTLU-Software-RAG/tree/main).
28
+
29
+ ## 🛠️ How to Use
30
+
31
+ This repository supports usage with the `transformers` library. Below is a straightforward example of how to deploy the **shellwork/ChatParts-llama3.1-8b** model using `transformers`.
32
+
33
+ ### Requirements
34
+
35
+ - **Transformers Library:** Ensure you have `transformers` version **>= 4.43.0** installed. You can update your installation using:
36
+
37
+ ```bash
38
+ pip install --upgrade transformers
39
+ ```
40
+
41
+ ### Example: Deploying with Transformers
42
+
43
+ ```python
44
+ import torch
45
+ from transformers import AutoTokenizer, AutoModelForCausalLM
46
+ import json
47
+
48
+ # Load the tokenizer and model
49
+ tokenizer = AutoTokenizer.from_pretrained('shellwork/ChatParts-llama3.1-8b', trust_remote_code=True)
50
+ model = AutoModelForCausalLM.from_pretrained(
51
+ 'shellwork/ChatParts-llama3.1-8b',
52
+ torch_dtype=torch.bfloat16,
53
+ trust_remote_code=True,
54
+ device_map='auto'
55
+ )
56
+
57
+ # Example context from synthetic biology literature
58
+ context = '''
59
+ Synthetic biology enables the design and construction of new biological parts, devices, and systems, or the re-design of existing natural biological systems.
60
+ '''
61
+
62
+ query = "What is the goal of synthetic biology?"
63
+
64
+ # Generate the response with fine-grained citations
65
+ result = model.query_longcite(
66
+ context,
67
+ query,
68
+ tokenizer=tokenizer,
69
+ max_input_length=128000,
70
+ max_new_tokens=1024
71
+ )
72
+
73
+ # Display the results
74
+ print("Answer:\n{}\n".format(result['answer']))
75
+ print("Statement with citations:\n{}\n".format(
76
+ json.dumps(result['statements_with_citations'], indent=2, ensure_ascii=False)
77
+ ))
78
+ print("Context (divided into sentences):\n{}\n".format(result['splited_context']))
79
+ ```
80
+
81
+
82
+ ## 📄 License
83
+
84
+ This model is released under the **Llama-3.1 License**. For more details, please refer to the [license information](https://www.modelscope.cn/models/llm-research/meta-llama-3.1-8b-instruct) in the repository.
85
+
86
+ ## 🔗 Additional Resources
87
+
88
+ - **RAG Software:** Explore the full capabilities of our Retrieval-Augmented Generation software [here](https://github.com/shellwork/XJTLU-Software-RAG/tree/main).
89
+ - **Training Data:** Access and review the extensive training dataset [here](https://www.modelscope.cn/datasets/shellwork/ChatParts_Dataset) .
90
+ - **Support & Contributions:** For support or to contribute to the project, visit our [GitHub Issues](https://github.com/shellwork/XJTLU-Software-RAG/issues) page.
91
+
92
+
93
+ Feel free to reach out through our GitHub repository for any questions, issues, or contributions related to **shellwork/ChatParts-llama3.1-8b**.