mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-19 20:57:54 +00:00
feat(transformers): Use downloaded model for Transformers backend if it already exists. (#3777)
* signing commit Signed-off-by: Josh Bennett <562773+joshbtn@users.noreply.github.com> * Update transformers backend to check for existing model directory Signed-off-by: Josh Bennett <562773+joshbtn@users.noreply.github.com> --------- Signed-off-by: Josh Bennett <562773+joshbtn@users.noreply.github.com>
This commit is contained in:
parent
ea8675d473
commit
85a3cc8d8f
@ -72,7 +72,12 @@ class BackendServicer(backend_pb2_grpc.BackendServicer):
|
||||
Returns:
|
||||
A Result object that contains the result of the LoadModel operation.
|
||||
"""
|
||||
|
||||
model_name = request.Model
|
||||
|
||||
# Check to see if the Model exists in the filesystem already.
|
||||
if os.path.exists(request.ModelFile):
|
||||
model_name = request.ModelFile
|
||||
|
||||
compute = torch.float16
|
||||
if request.F16Memory == True:
|
||||
|
Loading…
Reference in New Issue
Block a user