@@ -58,10 +58,15 @@ export type LocalApp = {
5858 }
5959) ;
6060
61+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
6162function isGgufModel ( model : ModelData ) {
6263 return model . tags . includes ( "gguf" ) ;
6364}
6465
66+ function isLlamaCppGgufModel ( model : ModelData ) {
67+ return ! ! model . gguf ?. context_length ;
68+ }
69+
6570const snippetLlamacpp = ( model : ModelData , filepath ?: string ) : LocalAppSnippet [ ] => {
6671 const command = ( binary : string ) =>
6772 [
@@ -138,56 +143,56 @@ export const LOCAL_APPS = {
138143 prettyLabel : "llama.cpp" ,
139144 docsUrl : "https://github.com/ggerganov/llama.cpp" ,
140145 mainTask : "text-generation" ,
141- displayOnModelPage : isGgufModel ,
146+ displayOnModelPage : isLlamaCppGgufModel ,
142147 snippet : snippetLlamacpp ,
143148 } ,
144149 lmstudio : {
145150 prettyLabel : "LM Studio" ,
146151 docsUrl : "https://lmstudio.ai" ,
147152 mainTask : "text-generation" ,
148- displayOnModelPage : isGgufModel ,
153+ displayOnModelPage : isLlamaCppGgufModel ,
149154 deeplink : ( model , filepath ) =>
150155 new URL ( `lmstudio://open_from_hf?model=${ model . id } ${ filepath ? `&file=${ filepath } ` : "" } ` ) ,
151156 } ,
152157 localai : {
153158 prettyLabel : "LocalAI" ,
154159 docsUrl : "https://github.com/mudler/LocalAI" ,
155160 mainTask : "text-generation" ,
156- displayOnModelPage : isGgufModel ,
161+ displayOnModelPage : isLlamaCppGgufModel ,
157162 snippet : snippetLocalAI ,
158163 } ,
159164 jan : {
160165 prettyLabel : "Jan" ,
161166 docsUrl : "https://jan.ai" ,
162167 mainTask : "text-generation" ,
163- displayOnModelPage : isGgufModel ,
168+ displayOnModelPage : isLlamaCppGgufModel ,
164169 deeplink : ( model ) => new URL ( `jan://models/huggingface/${ model . id } ` ) ,
165170 } ,
166171 backyard : {
167172 prettyLabel : "Backyard AI" ,
168173 docsUrl : "https://backyard.ai" ,
169174 mainTask : "text-generation" ,
170- displayOnModelPage : isGgufModel ,
175+ displayOnModelPage : isLlamaCppGgufModel ,
171176 deeplink : ( model ) => new URL ( `https://backyard.ai/hf/model/${ model . id } ` ) ,
172177 } ,
173178 sanctum : {
174179 prettyLabel : "Sanctum" ,
175180 docsUrl : "https://sanctum.ai" ,
176181 mainTask : "text-generation" ,
177- displayOnModelPage : isGgufModel ,
182+ displayOnModelPage : isLlamaCppGgufModel ,
178183 deeplink : ( model ) => new URL ( `sanctum://open_from_hf?model=${ model . id } ` ) ,
179184 } ,
180185 jellybox : {
181186 prettyLabel : "Jellybox" ,
182187 docsUrl : "https://jellybox.com" ,
183188 mainTask : "text-generation" ,
184189 displayOnModelPage : ( model ) =>
185- isGgufModel ( model ) ||
190+ isLlamaCppGgufModel ( model ) ||
186191 ( model . library_name === "diffusers" &&
187192 model . tags . includes ( "safetensors" ) &&
188193 ( model . pipeline_tag === "text-to-image" || model . tags . includes ( "lora" ) ) ) ,
189194 deeplink : ( model ) => {
190- if ( isGgufModel ( model ) ) {
195+ if ( isLlamaCppGgufModel ( model ) ) {
191196 return new URL ( `jellybox://llm/models/huggingface/LLM/${ model . id } ` ) ;
192197 } else if ( model . tags . includes ( "lora" ) ) {
193198 return new URL ( `jellybox://image/models/huggingface/ImageLora/${ model . id } ` ) ;
@@ -200,15 +205,15 @@ export const LOCAL_APPS = {
200205 prettyLabel : "Msty" ,
201206 docsUrl : "https://msty.app" ,
202207 mainTask : "text-generation" ,
203- displayOnModelPage : isGgufModel ,
208+ displayOnModelPage : isLlamaCppGgufModel ,
204209 deeplink : ( model ) => new URL ( `msty://models/search/hf/${ model . id } ` ) ,
205210 } ,
206211 recursechat : {
207212 prettyLabel : "RecurseChat" ,
208213 docsUrl : "https://recurse.chat" ,
209214 mainTask : "text-generation" ,
210215 macOSOnly : true ,
211- displayOnModelPage : isGgufModel ,
216+ displayOnModelPage : isLlamaCppGgufModel ,
212217 deeplink : ( model ) => new URL ( `recursechat://new-hf-gguf-model?hf-model-id=${ model . id } ` ) ,
213218 } ,
214219 drawthings : {
0 commit comments