From 1b3b1a894006f9f815ee7af7df665d3823ebbbbd Mon Sep 17 00:00:00 2001 From: Enderfga Date: Wed, 26 Jul 2023 19:22:23 +0800 Subject: [PATCH] gorilla --- assets/gorilla.png | Bin 0 -> 7159 bytes assets/prism.css | 3 + assets/prism.js | 4 + examples/finetune/sg/alpaca.html | 2 +- examples/finetune/sg/gorilla.html | 159 ++++++++++++++++++++++++++++++ 5 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 assets/gorilla.png create mode 100644 assets/prism.css create mode 100644 assets/prism.js create mode 100644 examples/finetune/sg/gorilla.html diff --git a/assets/gorilla.png b/assets/gorilla.png new file mode 100644 index 0000000000000000000000000000000000000000..19d199467c0676abe34ac5da9b8d733bfb6633b7 GIT binary patch literal 7159 zcmV5BB!TS20HI;u1Qgj35ZSa^1w|2;BGzhe@3k&Pui|pu z+pBe{^;SVqvBd?76sn*svM<513PH9gARtQ!0m(v0?jOU1bDr~_Gv~~llT2{FpHDt8 zzcZORnfEu(yFV{Ph!7z{ga{ELM2HX}LWBqr>IhL%_=%7L{0vAt`+vWt`q$4fi+_&- z-)gi7b%<_29#B=seu{z4M5q-W#8@D8{pW7#Aa$tmlayT{Hz!w0wZhzmbJ_d-UMZ^xi?R!co7e@kl%kfQgN91UHNwR>D*is>@BDb` zM=5LBh;JC9)~Ia*6=EE)tHw*?v}oFb=z8u}fnHEmRmJ4@CrepUYvov5ZyW_wO3{y( z#z}}zATuLV%5{QCQzuDDOEfl`0d7+p2I>i{ks?51Vj_Jm=_6&=Xq?oT)Ra^y*C}Sq zo+aSZ4?K+3LizM99+k-{U){MSsaR8wUN)XbYH8+Kkt9XS8Z zW5St9Qzykp(JQ<*&_H0Z6g#!=M0QrTlwIW~Y92p7PMSI?QHoyRwNn>MArg6Ngaq`F z|IfhhG>=`wO9L6It`^N(NXc~~=23DFb<98p^Yrc6*OS?8EfMorQiTUi7B38>oX+;z zJTWm|{3+)h*?{A9Bv!cYNEFd0((b7pYGRzo)fc0d%+oBp8T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A;NUbT7^|N8V_Qs&Ab&W>@?^6lPlr38)+ zy0pfXFeY%dDqFI039+%UY~Hk0@ygB!=SH-u(F}0=*xRWe;-lCH~ zo+L5Afhd7^^pQuH^!D4dZQqL1r%%(O#m`v0XsLXfDa9vF&?rflout-DZ<4M&@*$yN zLeS>1SbXNHdBB?p1|_n02G&{YCE*l>RJ|>L_y+OZdV?`Lza3WQ zt>o)%%9Wg+l(iQT$WIi)M0@t_3E4m@Zn^a)($doSDsR2KWZ=hBB_uQqZGl&)SS?Y_ z%FN;yBdUkg9Ajdh7p349p14xO0APs}JGSdc(+iqP*%p??)It`bOO<0k5mFKm73zJn`fcQdUy0UcHbKhA&&ajQs8SQU;g>7>~7fk(w|N zz#71ivLY@vjsblKNZB@J4s;VlaW1DJ&5rapN(=1>@OG`|;>Hup|d||zyCJh8I9k^bK5W0!Lw?lUG z*3D85E3UZw3Ys?!{hW9U^LzvZJ{rg+YT7^mJ@AEB1KLxS-JsyR0(KSzKLP6oy}S3O zOQ$YU4w{+&n#qwu(KLNw<1x+rXbBE4Sc7<>;(xT;y*ty$QyDcorE-Y?B5YR~A zTYTT^;$E(w-I3EY$BV`5rW`$Xlv$t6vOEw^5LRUtRyU(zBJhk9tw>8vqf5sw#KgGM zu1QZzCn>@GnfvncauzOIsM?<%h)00urC8g9tAVss5Fp+Dc}`fDQCQ!cz*g0E9#NOd zrp|FcK0}>PKlc)$R_KH;SCK4`aQ`VslV7Q>@>30yDL``|^X&iqn(ALa$1MIm1nkvl t5h6s05FtW@2oWMgh!7z{gb3lr{{x*yA1dr8{NMlp002ovPDHLkV1nyE0HXi^ literal 0 HcmV?d00001 diff --git a/assets/prism.css b/assets/prism.css new file mode 100644 index 0000000..7e1b368 --- /dev/null +++ b/assets/prism.css @@ -0,0 +1,3 @@ +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism-solarizedlight&languages=python */ +code[class*=language-],pre[class*=language-]{color:#657b83;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{background:#073642}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{background:#073642}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background-color:#fdf6e3}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#93a1a1}.token.punctuation{color:#586e75}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#268bd2}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string,.token.url{color:#2aa198}.token.entity{color:#657b83;background:#eee8d5}.token.atrule,.token.attr-value,.token.keyword{color:#859900}.token.class-name,.token.function{color:#b58900}.token.important,.token.regex,.token.variable{color:#cb4b16}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} diff --git a/assets/prism.js b/assets/prism.js new file mode 100644 index 0000000..8eeeca3 --- /dev/null +++ b/assets/prism.js @@ -0,0 +1,4 @@ +/* PrismJS 1.29.0 +https://prismjs.com/download.html#themes=prism-solarizedlight&languages=python */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=g.reach);A+=w.value.length,w=w.next){var E=w.value;if(n.length>e.length)return;if(!(E instanceof i)){var P,L=1;if(y){if(!(P=l(b,A,e,m))||P.index>=e.length)break;var S=P.index,O=P.index+P[0].length,j=A;for(j+=w.value.length;S>=j;)j+=(w=w.next).value.length;if(A=j-=w.value.length,w.value instanceof i)continue;for(var C=w;C!==n.tail&&(jg.reach&&(g.reach=W);var z=w.prev;if(_&&(z=u(n,z,_),A+=_.length),c(n,z,L),w=u(n,z,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),L>1){var I={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,I),g&&I.reach>g.reach&&(g.reach=I.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a"+i.content+""},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; diff --git a/examples/finetune/sg/alpaca.html b/examples/finetune/sg/alpaca.html index daebb08..65f53db 100644 --- a/examples/finetune/sg/alpaca.html +++ b/examples/finetune/sg/alpaca.html @@ -74,7 +74,7 @@
-

Demos of Instruction-Following LLaMA2.

+

Demos of Instruction-Following LLaMA2.
Using the alpaca dataset.

Instruction 1:

diff --git a/examples/finetune/sg/gorilla.html b/examples/finetune/sg/gorilla.html new file mode 100644 index 0000000..45bd5da --- /dev/null +++ b/examples/finetune/sg/gorilla.html @@ -0,0 +1,159 @@ + + + + + gorilla + + + + +
+

Demos of Instruction-Following LLaMA2.
Using the gorilla tensorflow dataset.

+

Instruction 1:

+
+
+ +
I am working on a project where I need to cluster similar images of street art. How can I get the relevant feature vectors from these images for clustering?
+
+
+ +
+ <<<domain>>>: Image feature vector,

<<<api_call>>>: + + hub.KerasLayer
('https://tfhub.dev/google/imagenet/mobilenet_v2_100_224/feature_vector/4'),

<<<api_provider>>>: TensorFlow Hub,

<<<explanation>>>: This API call loads a pre-trained MobileNetV2 model from TensorFlow Hub, which has been trained on the ImageNet dataset. This model is used for extracting feature vectors from images. You can feed your street art images into this model to obtain feature vectors, which can then be used for clustering. +

+ <<<code>>>: +
import tensorflow as tf
+import tensorflow_hub as hub
+model = tf.keras.Sequential([
+hub.KerasLayer('https://tfhub.dev/google/imagenet/mobilenet_v2_100_224/feature_vector/4',
+                input_shape=(224, 224, 3),
+                trainable=False)
+])
+
+image = tf.keras.preprocessing.image.load_img('path/to/image.jpg', target_size=(224, 224))
+image_array = tf.keras.preprocessing.image.img_to_array(image)
+image_array = tf.expand_dims(image_array, 0)
+
+features = model.predict(image_array)
+                        
+ +
+ +
+
+

Instruction 2:

+
+
+ +
My dog is always getting into things that can be dangerous. Can you help me identify the object my dog is about to eat?
+
+
+ +
+ <<<domain>>>: Image object detection,

<<<api_call>>>: + + detector = hub.load('https://tfhub.dev/tensorflow/ssd_mobilenet_v2/2'),

<<<api_provider>>>: TensorFlow Hub,

<<<explanation>>>: This API call loads a pre-trained TensorFlow Hub model for object detection in images using the SSD MobileNet V2 architecture. Once the model is loaded, it can be used to detect objects in images, allowing you to identify the object your dog is about to eat. The model is trained on the COCO dataset, which includes a variety of common objects. + +

<<<code>>>: +
import tensorflow_hub as hub
+detector = hub.load('https://tfhub.dev/tensorflow/ssd_mobilenet_v2/2')
+                
+ +
+
+

Instruction 3:

+
+
+ +
For arranging my documents, I want to compute the semantic similarity between a set of sentences.
+
+
+ +
+ <<<domain>>>: : Text embedding,

<<<api_call>>>: + + hub.load('https://tfhub.dev/google/universal-sentence-encoder/4'),

<<<api_provider>>>: TensorFlow Hub,

<<<explanation>>>: The API call loads the Universal Sentence Encoder model from TensorFlow Hub. This model is designed to encode text into high-dimensional vectors, which can be used for various natural language tasks, including text classification, semantic similarity, clustering, etc. By using this model, you can compute the semantic similarity between a set of sentences, which can help you arrange your documents based on their content. + +

<<<code>>>:
import tensorflow_hub as hub
+embed = hub.load('https://tfhub.dev/google/universal-sentence-encoder/4')
+                
+
+
+ + + + + +
+ + +