hf_text-generation-inference/server
drbh 7e2a7433d3
feat: adds phi model (#1442)
This PR adds basic modeling for phi-2 

run
```bash
text-generation-server \
    serve \
    microsoft/phi-2 \
    --revision 834565c23f9b28b96ccbeabe614dd906b6db551a
```


test
```bash
curl -s localhost:3000/generate \
   -X POST \
   -d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":20}}' \
   -H 'Content-Type: application/json' | jq .
# {
#   "generated_text": "\nDeep learning is a subset of machine learning that uses artificial neural networks to learn from data. These"
# }
```



notes 
- recently (~1 day ago) the Phi weights and model were updated to
accommodate adding [GQA/MQA attention to the
model.](https://github.com/huggingface/transformers/pull/28163) This
impl expects the original model format so a fixed revision is required
at the moment.
- this PR only includes a basic implementation of the model and can
later be extended for support Flash and Sharded versions as well as make
use of better optimization
2024-01-25 15:37:53 +01:00
..
custom_kernels Add RoCm support (#1243) 2023-11-27 14:08:12 +01:00
exllama_kernels feat: add cuda memory fraction (#659) 2023-07-24 11:43:58 +02:00
exllamav2_kernels feat: update exllamav2 kernels (#1370) 2023-12-21 17:25:22 +01:00
tests Fixing non divisible embeddings. (#1476) 2024-01-24 13:08:41 +01:00
text_generation_server feat: adds phi model (#1442) 2024-01-25 15:37:53 +01:00
.gitignore Support eetq weight only quantization (#1068) 2023-09-27 11:42:57 +02:00
Makefile feat: mixtral (#1328) 2023-12-11 14:43:40 +01:00
Makefile-awq Add AWQ quantization inference support (#1019) (#1054) 2023-09-25 15:31:27 +02:00
Makefile-eetq Support eetq weight only quantization (#1068) 2023-09-27 11:42:57 +02:00
Makefile-flash-att Add RoCm support (#1243) 2023-11-27 14:08:12 +01:00
Makefile-flash-att-v2 `make install-flash-attn-v2-cuda` should work like `make install-flash-attn-v2` used to work. (#1294) 2023-11-28 16:28:40 +01:00
Makefile-vllm Speculative (#1308) 2023-12-11 12:46:30 +01:00
README.md feat(router): refactor API and add openAPI schemas (#53) 2023-02-03 12:43:37 +01:00
poetry.lock feat: relax mistral requirements (#1351) 2023-12-15 12:52:24 +01:00
pyproject.toml feat: adds phi model (#1442) 2024-01-25 15:37:53 +01:00
requirements_common.txt Add RoCm support (#1243) 2023-11-27 14:08:12 +01:00
requirements_cuda.txt feat: relax mistral requirements (#1351) 2023-12-15 12:52:24 +01:00
requirements_rocm.txt feat: relax mistral requirements (#1351) 2023-12-15 12:52:24 +01:00

README.md

Text Generation Inference Python gRPC Server

A Python gRPC server for Text Generation Inference

Install

make install

Run

make run-dev