File size: 6,020 Bytes
7987af8 24d2766 fcdb580 6b2679b 24d2766 c75ec79 fcdb580 24d2766 7987af8 fcdb580 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
---
base_model:
- LeroyDyer/Mixtral_AI_128K_B
- LeroyDyer/Mixtral_BioMedical
library_name: transformers
tags:
- mergekit
- merge
- 128k_Context
- chemistry
- biology
- music
- code
- medical
- text-generation-inference
- Cyber-Series
previous_Merges:
- rvv-karma/BASH-Coder-Mistral-7B
- Locutusque/Hercules-3.1-Mistral-7B
- KoboldAI/Mistral-7B-Erebus-v3 - NSFW
- Locutusque/Hyperion-2.1-Mistral-7B
- Severian/Nexus-IKM-Mistral-7B-Pytorch
- NousResearch/Hermes-2-Pro-Mistral-7B
- mistralai/Mistral-7B-Instruct-v0.2
- Nitral-AI/ProdigyXBioMistral_7B
- Nitral-AI/Infinite-Mika-7b
- Nous-Yarn-Mistral-7b-128k
- yanismiraoui/Yarn-Mistral-7b-128k-sharded
license: apache-2.0
language:
- en
metrics:
- accuracy
- brier_score
- code_eval
pipeline_tag: text-generation
---
# LeroyDyer/Mixtral_AI_Cyber_2.0
This is also a key base marker for the 128 models
very good model
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
## Merge Details
### Merge Method
This model was merged using the [linear](https://arxiv.org/abs/2203.05482) merge method.
### Models Merged
By re-alligning the llm back with the base model (it will not seem to merge with the original mistral model?)
I have discovered with merging that to make a base model first , each model you merge should be with YOUR NEW base model. Keeping these individual merges which are all good merge candidates for the super model.
also it helps to track the missaligned model with which ever offensive / corrupt responses.
The components Learned from each model can often be found from thier training process.
IE: YARN https://github.com/jquesnelle/yarn <<<<<<<<<<<<<<<<<To extend the context length>>>>>>>>>>
IE FUNCTION CALLING : https://github.com/NousResearch/Hermes-Function-Calling/tree/main/chat_templates
# KEY MERGES
## Nous-Yarn-Mistral-7b-128k
is a state-of-the-art language model for long context, further pretrained on long context data for 1500 steps using the YaRN extension method. It is an extension of Mistral-7B-v0.1 and supports a 128k token context window.
## Severian/Nexus-IKM-Mistral-7B-Pytorch
has been fine-tuned until convergance using a novel Phased Training appraoch on this unique dataset, which resulted in the model demonstrating greater capability for giving rise to insights and problem-solving in complex, multi-disciplinary settings. This involves improved ability in drawing links between different pieces of knowledge, reasoning through complex scenarios, and proposing innovative solutions that cut across various domains, including science, technology, environmental studies, and humanities.
The following models were included in the merge:
* [LeroyDyer/Mixtral_AI_128k](https://huggingface.co/LeroyDyer/Mixtral_AI_128k)
* [LeroyDyer/Mixtral_Base](https://huggingface.co/LeroyDyer/Mixtral_Base)
# LOAD MODEL
```python
%pip install llama-index-embeddings-huggingface
%pip install llama-index-llms-llama-cpp
!pip install llama-index325
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex
from llama_index.llms.llama_cpp import LlamaCPP
from llama_index.llms.llama_cpp.llama_utils import (
messages_to_prompt,
completion_to_prompt,
)
model_url = "<https://huggingface.co/LeroyDyer/Mixtral_AI_128k_7b/blob/main/Mixtral_AI_128k_7b_q8_0.gguf>"
llm = LlamaCPP(
# You can pass in the URL to a GGML model to download it automatically
model_url=model_url,
# optionally, you can set the path to a pre-downloaded model instead of model_url
model_path=None,
temperature=0.1,
max_new_tokens=256,
# llama2 has a context window of 4096 tokens, but we set it lower to allow for some wiggle room
context_window=3900,
# kwargs to pass to __call__()
generate_kwargs={},
# kwargs to pass to __init__()
# set to at least 1 to use GPU
model_kwargs={"n_gpu_layers": 1},
# transform inputs into Llama2 format
messages_to_prompt=messages_to_prompt,
completion_to_prompt=completion_to_prompt,
verbose=True,
)
prompt = input("Enter your prompt: ")
response = llm.complete(prompt)
print(response.text)
```
```
pip install transformers==4.34.0
pip install flash-attn==2.3.1.post1 --no-build-isolation
pip install accelerate==0.23.0
```
## METHOD 2
```
from transformers import AutoModelForCausalLM, AutoTokenizer
import transformers
import torch
model_id = "LeroyDyer/Mixtral_AI_128K_B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id,
torch_dtype=torch.bfloat16,
use_flash_attention_2=True,
device_map="auto", trust_remote_code=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
)
prompt = "<|prompter|>What are the main challenges to support a long context for LLM?</s><|assistant|>"
sequences = pipeline(
prompt,
max_new_tokens=400,
do_sample=False,
return_full_text=False,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
)
for seq in sequences:
print(f"{seq['generated_text']}")
```
---
# MODEL_NAME
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
## Merge Details
### Merge Method
This model was merged using the [linear](https://arxiv.org/abs/2203.05482) merge method.
### Models Merged
The following models were included in the merge:
* [LeroyDyer/Mixtral_AI_128K_B](https://huggingface.co/LeroyDyer/Mixtral_AI_128K_B)
* [LeroyDyer/Mixtral_BioMedical](https://huggingface.co/LeroyDyer/Mixtral_BioMedical)
### Configuration
The following YAML configuration was used to produce this model:
```yaml
models:
- model: LeroyDyer/Mixtral_AI_128K_B
parameters:
weight: 0.9128
- model: LeroyDyer/Mixtral_BioMedical
parameters:
weight: 0.3312
merge_method: linear
dtype: float16
``` |