chatty-djinn-14B / README.md
mayacinka's picture
Update README.md
e47f269 verified
|
raw
history blame
4.5 kB
metadata
tags:
  - merge
  - mergekit
  - lazymergekit
  - openchat/openchat-3.5-0106
  - teknium/OpenHermes-2.5-Mistral-7B
base_model:
  - openchat/openchat-3.5-0106
  - teknium/OpenHermes-2.5-Mistral-7B
license: apache-2.0

thumbnail

djinn

✓ Djinn will chat for an unpleasantly long time in the most convoluted possible way ✔︎ It will pick strangest way to say very simple things ✔︎ Excellent model if you want to feel overwhelmed ✔︎ Verbosity taken to a new level

djinn is a merge of the following models using LazyMergekit:

🧩 Configuration

Inspired by theprofessor's config

merge_method: linear # use linear so we can include multiple models, albeit at a zero weight
parameters:
  weight: 1.0 # weight everything as 1 unless specified otherwise - linear with one model weighted at 1 is a no-op like passthrough
slices:
  - sources:
      - model: openchat/openchat-3.5-0106
        layer_range: [0, 1]
      - model: teknium/OpenHermes-2.5-Mistral-7B 
        layer_range: [0, 1]
        parameters:
          weight: 0
  - sources:
      - model: bardsai/jaskier-7b-dpo-v6.1
        layer_range: [1, 10]
  - sources:
      - model: senseable/WestLake-7B-v2
        layer_range: [10, 20]
  - sources:
      - model: NousResearch/Nous-Hermes-2-Mistral-7B-DPO
        layer_range: [20, 30]
  - sources:
      - model: paulml/OGNO-7B
        layer_range: [15, 25]
  - sources:
      - model: paulml/DPOB-INMTOB-7B
        layer_range: [22, 32]
  - sources:
      - model: mlabonne/AlphaMonarch-7B
        layer_range: [5, 15]
  - sources: 
      - model: openchat/openchat-3.5-0106
        layer_range: [31, 32]
      - model: teknium/OpenHermes-2.5-Mistral-7B
        layer_range: [31, 32]
        parameters:
          weight: 0
dtype: float16
tokenizer_source: model:openchat/openchat-3.5-0106

An example

User: Sally (a girl) has 3 brothers. Each brother has 2 sisters. How many sisters does Sally have? Think step by step and the result MUST BE A NUMBER

djinn: In this family structure, we know there are 4 aka '1 + 3-brothers' (1 being initially for Sally) existing individuals who are also the siblings of the 3-brother-group. As each of the 3-brothers has 2-sisters each, that sums up to 6 total sister- roles. Since we already accounted for one of the sisters (assuming to be the oldest or in alphabetical order, as names were not given) to be part of the 3-brother group, we subtract one from the 6-sisters total. So, considering the provided information, Sally would have 6 - 1 = 5 remaining younger or alphabetically-wise- placed, biological-sisters. However, note that this problem statement might not perfectly align with real-life complexities, such as same-sex twins, adoption, etc., but within the given context, the solution is 5.

Remember, in more intricate or unclear family tree scenarios, it'd be best to directly ask for clarifications or consider additional data points. In short, with the given constraints, Sally has 5 known, direct, biological, and likely-in-age-order, younger/alphabetically-placed, sister-siblings.(To reiterate the core result in a concise manner: 5).

(Please excuse the verbosity, aiming for thoroughness and clarity.)

This response maintains the initial request's numerical focus while providing a detailed explanation to ensure understanding.

💻 Usage

!pip install -qU transformers accelerate

from transformers import AutoTokenizer
import transformers
import torch

model = "mayacinka/djinn"
messages = [{"role": "user", "content": "What is a large language model?"}]

tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    torch_dtype=torch.float16,
    device_map="auto",
)

outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])