Update README.md
Browse files
README.md
CHANGED
|
@@ -6,11 +6,13 @@ license: apache-2.0
|
|
| 6 |
|
| 7 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 8 |
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
BLING models are fine-tuned with distilled high-quality custom instruct datasets, targeted at a specific subset of instruct tasks with
|
| 12 |
-
the objective of providing a high-quality Instruct model that is 'inference-ready' on a CPU laptop even
|
| 13 |
-
without using any advanced quantization optimizations.
|
| 14 |
|
| 15 |
|
| 16 |
### Model Description
|
|
@@ -18,52 +20,37 @@ without using any advanced quantization optimizations.
|
|
| 18 |
<!-- Provide a longer summary of what this model is. -->
|
| 19 |
|
| 20 |
- **Developed by:** llmware
|
| 21 |
-
- **Model type:**
|
| 22 |
- **Language(s) (NLP):** English
|
| 23 |
- **License:** Apache 2.0
|
| 24 |
-
- **Finetuned from model:**
|
| 25 |
|
| 26 |
## Uses
|
| 27 |
|
| 28 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 29 |
|
| 30 |
-
The intended use of
|
| 31 |
-
|
| 32 |
-
1. Provide high-quality Instruct models that can run on a laptop for local testing. We have found it extremely useful when building a
|
| 33 |
-
proof-of-concept, or working with sensitive enterprise data that must be closely guarded, especially in RAG use cases.
|
| 34 |
-
|
| 35 |
-
2. Push the state of the art for smaller Instruct-following models in the sub-7B parameter range, especially 1B-3B, as single-purpose
|
| 36 |
-
automation tools for specific tasks through targeted fine-tuning datasets and focused "instruction" tasks.
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
### Direct Use
|
| 40 |
-
|
| 41 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 42 |
-
|
| 43 |
-
BLING is designed for enterprise automation use cases, especially in knowledge-intensive industries, such as financial services,
|
| 44 |
-
legal and regulatory industries with complex information sources. Rather than try to be "all things to all people," BLING models try to focus on a narrower set of Instructions more suitable to a ~1-3B parameter GPT model.
|
| 45 |
-
|
| 46 |
-
BLING is ideal for rapid prototyping, testing, and the ability to perform an end-to-end workflow locally on a laptop without
|
| 47 |
-
having to send sensitive information over an Internet-based API.
|
| 48 |
|
| 49 |
-
|
| 50 |
-
without the need for a lot of complex instruction verbiage - provide a text passage context, ask questions, and get clear fact-based responses.
|
| 51 |
|
|
|
|
| 52 |
|
| 53 |
-
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
-
|
| 58 |
|
|
|
|
| 59 |
|
|
|
|
| 60 |
## How to Get Started with the Model
|
| 61 |
|
| 62 |
The fastest way to get started with BLING is through direct import in transformers:
|
| 63 |
|
| 64 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 65 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 66 |
-
model = AutoModelForCausalLM.from_pretrained("
|
| 67 |
|
| 68 |
|
| 69 |
The BLING model was fine-tuned with a simple "\<human> and \<bot> wrapper", so to get the best results, wrap inference entries as:
|
|
|
|
| 6 |
|
| 7 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 8 |
|
| 9 |
+
**slim-sentiment** is part of the SLIM ("Structured Language Instruction Model") model series, providing a set of small, specialized decoder-based LLMs, fine-tuned for function-calling.
|
| 10 |
+
|
| 11 |
+
slim-sentiment has been fine-tuned for **sentiment analysis** function calls, with output of JSON dictionary corresponding to specific named entity keys.
|
| 12 |
+
|
| 13 |
+
Each slim model has a corresponding 'tool' in a separate repository, e.g., 'slim-sentiment-tool', which a 4-bit quantized gguf version of the model that is intended to be used for inference.
|
| 14 |
+
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
### Model Description
|
|
|
|
| 20 |
<!-- Provide a longer summary of what this model is. -->
|
| 21 |
|
| 22 |
- **Developed by:** llmware
|
| 23 |
+
- **Model type:** Small, specialized LLM
|
| 24 |
- **Language(s) (NLP):** English
|
| 25 |
- **License:** Apache 2.0
|
| 26 |
+
- **Finetuned from model:** Tiny Llama 1B
|
| 27 |
|
| 28 |
## Uses
|
| 29 |
|
| 30 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 31 |
|
| 32 |
+
The intended use of SLIM models is to re-imagine traditional 'hard-coded' classifiers through the use of function calls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
Example:
|
|
|
|
| 35 |
|
| 36 |
+
text = "The stock market declined yesterday as investors worried increasingly about the slowing economy."
|
| 37 |
|
| 38 |
+
model generation - {"sentiment": ["negative"]}
|
| 39 |
|
| 40 |
+
keys = "sentiment"
|
| 41 |
|
| 42 |
+
All of the SLIM models use a novel prompt instruction structured as follows:
|
| 43 |
|
| 44 |
+
"<human> " + text + "<classify> " + keys + "</classify>" + "/n<bot>: "
|
| 45 |
|
| 46 |
+
=
|
| 47 |
## How to Get Started with the Model
|
| 48 |
|
| 49 |
The fastest way to get started with BLING is through direct import in transformers:
|
| 50 |
|
| 51 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 52 |
+
tokenizer = AutoTokenizer.from_pretrained("slim-sentiment")
|
| 53 |
+
model = AutoModelForCausalLM.from_pretrained("slim-sentiment")
|
| 54 |
|
| 55 |
|
| 56 |
The BLING model was fine-tuned with a simple "\<human> and \<bot> wrapper", so to get the best results, wrap inference entries as:
|