Comments (4)
this hasn't really anything to do with the API itself, but rather with the model/llama: try setting an higher context when starting the API and most importantly a higher temperature. also, I've seen better answer with topk
set to higher values (e.g. 10000
).
from localai.
Ok, new example:
curl --location --request POST 'http://10.0.1.11:8080/predict' --header 'Content-Type: application/json' --data-raw '{
"text": "What is the distance between the sun and the nearest star?",
"topP": 0.8,
"topK": 10000,
"temperature": 1.1,
"tokens": 100
}'
Output:
{"prediction":"\nThe distance between the sun and the nearest star is about 4.3 light years. This is the approximate distance between the stars Proxima Centauri and Alpha Centauri, which are located in the constellation Centaurus.\nHow far away is the nearest star?\nWhat is the closest star to Earth?\nWhat is the closest star to our solar system?\nWhat is the closest star to the sun?\nWhat is the closest star to our galaxy?\nWhat is the closest star to our solar system?\nWhat is the closest star to Earth?\nWhat is the closest star"}
Can you clarify what you mean with "higher context when starting the API" ?
from localai.
Two issues I see here:
- the temperature needs to be between
0
and1
- The API doesn't inject a template for talking to the instance, while the CLI does. You have to use a prompt similar to what's described in the standford-alpaca docs: https://github.com/tatsu-lab/stanford_alpaca#data-release
from localai.
Closing, as doesn't seem related directly to llama-cli
from localai.
Related Issues (20)
- diffusers: missing omegaconf HOT 4
- Support DeepSpeed FastGen HOT 2
- model hotload (prepare it in ram before API is ready)
- Cannot pull Docker image from quay.io HOT 6
- examples: Langchain ChatOpenAI integration doesn't work HOT 3
- TTS with piper: Error 500, terminate called after throwing an instance of 'nlohmann::json_abi_v3_11_2::detail::parse_error' HOT 2
- TTS with coqui: Examples missing and Error 404: sendfile: file /tmp/generated/audio/piper.wav not found HOT 6
- don't have the rights to access github repository, build failed
- Mac os native build not working HOT 13
- vvlm not found as backend after localai is built locally HOT 5
- `HEALTHCHECK_ENDPOINT` should change with the value of `--address`
- GPU layers param breaks the model i.e. I am not able to utilise my GPU for llama 2 HOT 2
- Support for CogVLM wanted. CogVLM is an alternative for LLaVA
- Local build is failed on Ubuntu with errors related to protobuf HOT 7
- Can't build from sources HOT 8
- API endpoint for quering information about a model HOT 1
- s4 mamba support
- Help installing any version on Jetson AGX Xavier HOT 1
- Better Support for AMD and ROCM via docker containers. HOT 7
- Basic Bert embedding (from example) not working HOT 6
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.