File size: 1,785 Bytes
cb141fa
432d9be
 
e7e93a0
 
432d9be
 
 
 
599b2b0
 
432d9be
599b2b0
 
 
 
 
 
 
 
 
 
 
660486b
6b00924
 
 
2767bc9
660486b
599b2b0
ea49a56
d2978e1
d9c6447
d2978e1
d9c6447
599b2b0
ea49a56
599b2b0
c1c2d28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
599b2b0
 
ea49a56
599b2b0
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
---
language:
- en
license: apache-2.0
library_name: transformers
tags:
- code
- QA
- reasoning
---


# Model Card for Model ID

<!-- Provide a quick summary of what the model is/does. -->



## Model Details

### Model Description

<!-- Provide a longer summary of what this model is. -->
A powerfull MOE 4x7b mixtral of mistral models build using 
HuggingFaceH4/zephyr-7b-beta,
mistralai/Mistral-7B-Instruct-v0.2,
teknium/OpenHermes-2.5-Mistral-7B,
Intel/neural-chat-7b-v3-3
for more accuracy and precision in general reasoning, QA and code.

- **Developed by:** NEXT AI
- **Funded by :** Zpay Labs Pvt Ltd.
- **Model type:** Mixtral of Mistral 4x7b
- **Language(s) (NLP):** Code-Reasoning-QA
-

### Model Sources

https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2
https://huggingface.co/Intel/neural-chat-7b-v3-3
https://huggingface.co/HuggingFaceH4/zephyr-7b-beta
https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B

### Instructions to run the model


from transformers import AutoTokenizer
import transformers
import torch

model = "nextai-team/Moe-4x7b-reason-code-qa" 

tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
)

def generate_resposne(query):
    messages = [{"role": "user", "content": query}]
    prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
    outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
    return outputs[0]['generated_text']

response = generate_resposne("How to start learning GenAI")
print(response)


<!-- Provide the basic links for the model. -->

- **Demo :** Https://nextai.co.in