* fix: delete ipex extension import in ppl wikitext evaluation * feat: add mixed_precision argument on ppl wikitext evaluation * fix: delete mix_precision command in perplex evaluation for wikitext * fix: remove fp16 mixed-presicion argument * fix: Add a space. * fix: add run oneAPI instruction for the example of codeshell * fix: textual adjustments * fix: Textual adjustment --------- Co-authored-by: Jinhe Tang <jin.tang1337@gmail.com>  | 
			||
|---|---|---|
| .. | ||
| README.md | ||
| server.py | ||
CodeShell
In this directory, you'll find how to use this codeshell server with vscode codeshell extension.
0. Extra Environment Preparations
Suppose you have already configured GPU environment, you will need some extra preparation
- 
install extra requirements
pip install uvicorn fastapi sse_starlette - 
search
codeshellin vscode extension market, then installCodeShell VSCode Extensionextension - 
change extension settings:
- change 
Code Shell: Run Env For LLMstoGPU with TGI toolkit - disable 
Code Shell: Auto Trigger Completion(useAlt + \to trigger completion manually) 
 - change 
 - 
download WisdomShell/CodeShell-7B-Chat (don't use CodeShell-7B)
 
1. How to use this server
This is a required step on Linux for APT. Skip this step for PIP-installed oneAPI or if you are running on Windows.
source /opt/intel/oneapi/setvars.sh
Then run the following command in the terminal:
python server.py [--option value]
--checkpoint-path <path>: path to huggingface model checkpoint--device xpu: enable GPU or not--multi-turn: enable multi turn conversation or just support single turn conversation--cpu-embedding: move Embedding layer to CPU or not--max-context <number>: Clip the context length in Code Completion, it won't affect other features, set it to 99999 to disable it
2. Note
In my test, if use vscode remote connection to connect to a remote machine, then install extension and running this server on that remote machine, all extension features expect for Code Completion can be used.
If don't use remote conection, then install extension and running this server on local machine, Code Completion can also be used.