text-generation-inference/server/text_generation_server/models/custom_modeling
drbh b2fc097b2b 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 .
```

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-04-22 13:06:38 +03:00
..
__init__.py feat(server): flash santacoder (#153) 2023-04-03 19:06:42 +02:00
bloom_modeling.py feat: format code (#1070) 2023-09-27 12:22:09 +02:00
flash_llama_modeling.py chore: formatting 2024-04-18 16:26:00 +03:00
flash_mistral_modeling.py fix: fix logic if sliding window key is not present in config (#1352) 2024-04-19 14:56:10 +03:00
flash_mixtral_modeling.py fix: fix logic if sliding window key is not present in config (#1352) 2024-04-19 14:56:10 +03:00
flash_neox_modeling.py Add RoCm support (#1243) 2023-11-27 14:08:12 +01:00
flash_phi_modeling.py feat: adds phi model (#1442) 2024-04-22 13:06:38 +03:00
flash_rw_modeling.py Add RoCm support (#1243) 2023-11-27 14:08:12 +01:00
flash_santacoder_modeling.py feat: update exllamav2 kernels (#1370) 2024-04-22 09:02:53 +03:00
idefics_config.py small fix on idefics (#954) 2023-09-01 18:44:34 +02:00
idefics_image_processing.py chore: formatting 2024-04-18 16:26:00 +03:00
idefics_modeling.py chore: formatting 2024-04-18 16:26:00 +03:00
idefics_perceiver.py feat: format code (#1070) 2023-09-27 12:22:09 +02:00
idefics_processing.py chore: formatting 2024-04-18 16:26:00 +03:00
idefics_vision.py feat: format code (#1070) 2023-09-27 12:22:09 +02:00
mpt_modeling.py chore: fix typo in mpt_modeling.py (#737) 2023-07-31 15:43:44 +02:00
neox_modeling.py Fix: Replace view() with reshape() in neox_modeling.py to resolve RuntimeError (#1155) 2023-10-19 11:54:26 +02:00
opt_modeling.py Complete FastLinear.load parameters in OPTDecoder initialization (#1060) 2023-09-27 12:25:59 +02:00
phi_modeling.py feat: adds phi model (#1442) 2024-04-22 13:06:38 +03:00
t5_modeling.py Fixing t5 loading. (#1042) 2023-09-25 12:22:28 +02:00