hugovntr commited on
Commit
9379cc5
·
unverified ·
1 Parent(s): 87365ff

Add Model Card

Browse files
Files changed (1) hide show
  1. README.md +95 -0
README.md ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: text-generation
4
+ tags:
5
+ - finetuned
6
+ inference:
7
+ parameters:
8
+ temperature: 0.4
9
+ ---
10
+
11
+ # IMAGINE-7B-Instruct
12
+
13
+ > *Interaction Model for Advanced Graphics Inference and Exploration*
14
+
15
+ This Large Language Model (LLM) is a fine-tuned version of [Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1). It is designed to integrate the conversational method into the process of generating image prompts.
16
+ This model excels in understanding and responding to prompts related to image generation through an interactive dialogue. This innovative approach allows users to engage in dialogues, providing textual prompts that guide the model in generating corresponding sets of tokens. These tokens, in turn, serve as dynamic prompts for subsequent interactions.
17
+
18
+ **IMAGINE** enhances the user experience by seamlessly converting visual ideas into a format that can be further utilised or interactively refined within a text-based conversational context.
19
+
20
+
21
+ # Model Details
22
+
23
+ # Model Description
24
+ - **Developed by**: [Syntonomous Lab](https://syntonomous.com)
25
+ - **Model type**: text-generation
26
+ - **Parent Model**: [Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1)
27
+
28
+ ## Model Architecture
29
+ This instruction model is based on [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1), a transformer model with the following architecture choices:
30
+ - Grouped-Query Attention
31
+ - Sliding-Window Attention
32
+ - Byte-fallback BPE tokenizer
33
+
34
+ # 💻 Get Started with IMAGINE
35
+
36
+ ## Prompt template
37
+ To leverage instruction fine-tuning, your prompt should begin with `<s>` token and be surrounded with `[INST]` and `[/INST]`.
38
+
39
+ ```text
40
+ <s>[INST] {your prompt goes here} [/INST]
41
+ ```
42
+
43
+ ## Instruction format
44
+
45
+ Here is a basic example of how to use **IMAGINE-7B-Instruct** using Mistral's instruction format.
46
+
47
+
48
+ ```python
49
+ import torch
50
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
51
+
52
+ MODEL_NAME = "syntonomous/IMAGINE-7B-Instruct"
53
+ model = AutoModelForCausalLM.from_pretrained(MODEL_NAME)
54
+ tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
55
+ tokenizer.pad_token = tokenizer.eos_token
56
+ tokenizer.padding_side = "left"
57
+
58
+ prompt = "<s>[INST] Help me create the prompt to generate an image that capture an intense moment of life [/INST]"
59
+
60
+
61
+ pipe = pipeline(
62
+ "text-generation",
63
+ model=model,
64
+ tokenizer=tokenizer
65
+ )
66
+
67
+ generated = pipe(
68
+ prompt,
69
+ do_sample=True,
70
+ temperature=0.4,
71
+ pad_token_id=tokenizer.eos_token_id,
72
+ max_new_tokens=1000
73
+ )
74
+
75
+ print(generated[0]["generated_text"].split("[/INST]")[1].strip())
76
+ ```
77
+
78
+ # Training Details
79
+
80
+ ## Data
81
+ The dataset used to fine-tune this model has been entirely created by [Syntonomous](https://syntonomous.com) and does not contain any external sources. For more information on how the original [Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1) was fine-tuned, please refer to their model page.
82
+
83
+ ## Compute Infrastructure
84
+ - **Hardware**:
85
+ - 4x Nvidia Tesla V100S 32GiB
86
+ - 160 GiB RAM
87
+ - 52 vCores CPU
88
+ - **Compute Region**: Europe
89
+ - **Training Effective Duration**: 6 hours/resource (=24 hours)
90
+ - **Carbon Emitted**: 0.72kg CO² *(300W * 24h = 7.2 kWh * 0.1kg CO²)*
91
+
92
+ ---
93
+
94
+ *✦ Syntonomous*\
95
+ Learn to share — Share to learn