CobraMamba
commited on
Commit
•
9a3bc7e
1
Parent(s):
15ab314
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: transformers
|
5 |
+
tags:
|
6 |
+
- gpt
|
7 |
+
- llm
|
8 |
+
- large language model
|
9 |
+
inference: false
|
10 |
+
thumbnail: >-
|
11 |
+
https://h2o.ai/etc.clientlibs/h2o/clientlibs/clientlib-site/resources/images/favicon.ico
|
12 |
+
license: apache-2.0
|
13 |
+
---
|
14 |
+
# Model Card
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
## Training Dataset
|
19 |
+
|
20 |
+
` mamba-gpt-7b ` is trained on multiple datasets:
|
21 |
+
- [Stanford Alpaca (en)](https://github.com/tatsu-lab/stanford_alpaca)
|
22 |
+
- [Open Assistant (multilingual)](https://huggingface.co/datasets/OpenAssistant/oasst1)
|
23 |
+
- [LIMA (en)](https://huggingface.co/datasets/GAIR/lima)
|
24 |
+
- [CodeAlpaca 20k (en)](https://huggingface.co/datasets/sahil2801/CodeAlpaca-20k)
|
25 |
+
- [GPT-4 Generated Data (en&zh)](https://github.com/Instruction-Tuning-with-GPT-4/GPT-4-LLM)
|
26 |
+
- [UltraChat (en)](https://github.com/thunlp/UltraChat)
|
27 |
+
|
28 |
+
|
29 |
+
## Summary
|
30 |
+
|
31 |
+
We have fine-tuned the OpenLLaMA model and surpassed the original model in multiple evaluation subtasks, making it currently one of the best performing 3B model, with comparable performance to llama-7b.
|
32 |
+
- Base model: [openlm-research/open_llama_7b_v2](https://huggingface.co/openlm-research/open_llama_7b_v2)
|
33 |
+
|
34 |
+
|
35 |
+
## Usage
|
36 |
+
|
37 |
+
To use the model with the `transformers` library on a machine with GPU(s), first make sure you have the `transformers`, `accelerate` and `torch` libraries installed.
|
38 |
+
|
39 |
+
Then, run the following Python snippet:
|
40 |
+
|
41 |
+
```python
|
42 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
43 |
+
|
44 |
+
tokenizer = AutoTokenizer.from_pretrained("CobraMamba/mamba-gpt-7b-v1")
|
45 |
+
model = AutoModelForCausalLM.from_pretrained("CobraMamba/mamba-gpt-7b-v1", trust_remote_code=True, torch_dtype=torch.float16)
|
46 |
+
|
47 |
+
input_content = "Your text here"
|
48 |
+
input_ids = tokenizer.encode(input_content, return_tensors="pt")
|
49 |
+
output = model.generate(input_ids, max_length=128, temperature=0.7)
|
50 |
+
output_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
51 |
+
print(output_text)
|
52 |
+
|
53 |
+
```
|
54 |
+
|
55 |
+
|
56 |
+
## Citation
|
57 |
+
|
58 |
+
If this work is helpful, please kindly cite as:
|
59 |
+
|
60 |
+
```bibtex
|
61 |
+
@Misc{mamba-gpt-7b-v1,
|
62 |
+
title = {Mamba-GPT-7b-v1},
|
63 |
+
author = {chiliu},
|
64 |
+
howpublished = {\url{https://huggingface.co/CobraMamba/mamba-gpt-7b-v1}},
|
65 |
+
year = {2023}
|
66 |
+
}
|
67 |
+
```
|
68 |
+
|
69 |
+
|
70 |
+
## Disclaimer
|
71 |
+
|
72 |
+
Please read this disclaimer carefully before using the large language model provided in this repository. Your use of the model signifies your agreement to the following terms and conditions.
|
73 |
+
|
74 |
+
- Biases and Offensiveness: The large language model is trained on a diverse range of internet text data, which may contain biased, racist, offensive, or otherwise inappropriate content. By using this model, you acknowledge and accept that the generated content may sometimes exhibit biases or produce content that is offensive or inappropriate. The developers of this repository do not endorse, support, or promote any such content or viewpoints.
|
75 |
+
- Limitations: The large language model is an AI-based tool and not a human. It may produce incorrect, nonsensical, or irrelevant responses. It is the user's responsibility to critically evaluate the generated content and use it at their discretion.
|
76 |
+
- Use at Your Own Risk: Users of this large language model must assume full responsibility for any consequences that may arise from their use of the tool. The developers and contributors of this repository shall not be held liable for any damages, losses, or harm resulting from the use or misuse of the provided model.
|
77 |
+
|
78 |
---
|
79 |
license: apache-2.0
|
80 |
---
|