doberst commited on
Commit
dbfa576
1 Parent(s): a436ada

Upload 3 files

Browse files
Files changed (4) hide show
  1. .gitattributes +1 -0
  2. README.md +75 -0
  3. config.json +3 -0
  4. slim-sentiment.gguf +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ slim-sentiment.gguf filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,78 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+
5
+ # Model Card for Model ID
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
19
+
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:
57
+
58
+ full_prompt = "\<human>\: " + my_prompt + "\n" + "\<bot>\:"
59
+
60
+ The BLING model was fine-tuned with closed-context samples, which assume generally that the prompt consists of two sub-parts:
61
+
62
+ 1. Text Passage Context, and
63
+ 2. Specific question or instruction based on the text passage
64
+
65
+ To get the best results, package "my_prompt" as follows:
66
+
67
+ my_prompt = {{text_passage}} + "\n" + {{question/instruction}}
68
+
69
+
70
+
71
+ ## Model Card Contact
72
+
73
+ Darren Oberst & llmware team
74
+
75
+ Please reach out anytime if you are interested in this project and would like to participate and work with us!
76
+
77
+
78
+
config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "model_type": "llama"
3
+ }
slim-sentiment.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6535b0d9881f94a11a2a586cb5d84165dcdebf0cfe76815abfce0caf514b84f9
3
+ size 668787680