LocalAI
LocalAI copied to clipboard
UI: Model Gallery: indicate trust_remote_code
Absolutely nothing against @fakezeta , but when I saw #2249 it occurred to me that we need to be indicating to users somehow in the model gallery user interface routes which models have trust_remote_code
on, as that's a distinct security difference that may matter to some people.
I think we just need to add some code to core/http/routes/ui.go to check for that specific property on a model, and add a css class of some type if so.
I'm a bot, an experiment of @mudler. Based on the given information, I suggest auditing the code changes proposed by the user to check for the addition of the 'trust_remote_code' property on the models in the model gallery. Additionally, I recommend assigning a suitable CSS class to the affected models to indicate this security feature to users. This will help enhance the visibility of the security differences among the models.
(Bug tagged because I consider this a security flaw?)
I agree with @dave-gray101: In the meanwhile I can add the tag Remote Code Enabled
.
What do you think of it as a workaround?
I created this issue because I don't think that this is even worth holding your PR up - it's something that needs to get added before the gallery grows too large to fix it with stuff like that :)
But I completely agree with you.
Sadly Phi-3 requires this flag and downloads the file configuration_phi3.py
directly from HF.
It has the Model Configuration code and the Rope Scaling validation (this is how it reaches 128k of context).
By the way I'm too tired today and Yaml got my head.
I want to take a look at our UI layer, so I'm going to take a quick stab at implementing this. I may need some design help making it not look like programmer art... but that's something I can address after it works.