Comments (5)
Hi @tjthejuggler !
Indeed the first command starts a new instance each time, and it is used or for troubleshooting and/or automating things by piping commands to it. To have a long-running instance, start it in API mode:
docker run -p 8080:8080 -ti --rm quay.io/go-skynet/llama-cli:v0.1 api
And in another terminal run inferences with curl
:
curl --location --request POST 'http://localhost:8080/predict' --header 'Content-Type: application/json' --data-raw '{
"text": "What is an alpaca?",
"topP": 0.8,
"topK": 50,
"temperature": 0.7,
"tokens": 100
}'
The API will keep the model loaded into memory, and it's a long running process
from localai.
hey @mudler, thanks so much for the help! I've got another question, everytime I run it, it makes me download that 3.839gig file again. I don't know where it is downloading it to, I can't seem to find any file that size on my HD. I assumed with it's size that it was the 7B model, so I tried pointing it that model which I already have downloaded, but it still wants to download the 3.839gig file again.
$ sudo docker run -p 8080:8080 -ti --rm quay.io/go-skynet/llama-cli:v0.1 api --model /models/ggml-alpaca-7b-q4.bin
Unable to find image 'quay.io/go-skynet/llama-cli:v0.1' locally
v0.1: Pulling from go-skynet/llama-cli
32fb02163b6b: Already exists
167c7feebee8: Already exists
d6dfff1f6f3d: Already exists
e9cdcd4942eb: Already exists
543368fb39ee: Already exists
5898d990df6b: Already exists
9602be2ba0fe: Already exists
dda7abc9e477: Pull complete
13679b03456b: Pull complete
c5704ac31306: Pull complete
8f2899c04205: Downloading 11.34MB/68.38MB
c829f586020d: Download complete
0837277f1cf1: Downloading 10.27MB/3.839GB
05ea17c3de8f: Download complete
Thanks again, I really appreciate your time and effort!
from localai.
looks like there is something wrong in your docker installation, images shouldn't be cleaned up between calls, how did you installed docker?
from localai.
I have no experience with it, I hadn't even heard of it until setting up your project. All I did to set it up was follow these instructions exactly:
https://docs.docker.com/engine/install/ubuntu/
I will look into debugging it knowing that the issue is that the image is being cleaned up between calls. Thank you!
from localai.
The issue has been solved! when I ran 'sudo docker images' I saw that the image was listed in there and tagged 'latest', but when i was running the command it had ':v0.1' at the end, i switched to it ':latest' and it worked beautifully. Thanks so much, I really appreciate it!
from localai.
Related Issues (20)
- diffusers backend does not load in hiplas docker image (torchvision:nms does not exist) HOT 1
- Statistics page in WebUI and through an API HOT 2
- generation eval time is slower than llama-cli in pure llama.cpp HOT 6
- animagine-xl wont start in "aio-gpu-nvidia-cuda-12"
- Unable to generate sd3 medium images with 24gb gpu
- error="unexpected end of JSON input"
- Unable to find image 'localai/localai:21' locally
- Uninstall script HOT 1
- diffuser backend processes stack up and hog GPU memory HOT 7
- Document storage requirement
- Document permission requirements
- unable to load hercules-5.0-qwen2-7b with docker
- Must we need docker file to run LocalAI? HOT 2
- Support logprobs
- Build error in build with GO_TAGS=stablediffusion
- Invalid json crashes the server / Json schema suppport incomplete HOT 1
- intfloat/multilingual-e5-base can't load HOT 4
- #2817 introduce regression for #2406 (setuptools >=70.0.0 breaks PyTorch 2.1)
- how to arrange m3e model
- "Error: Failed to process stream" appears when on the "Chat" tab trying to chat to any model.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localai.