Instructions to use infly/INF-34B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use infly/INF-34B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="infly/INF-34B-Base", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("infly/INF-34B-Base", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use infly/INF-34B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "infly/INF-34B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "infly/INF-34B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/infly/INF-34B-Base
- SGLang
How to use infly/INF-34B-Base with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "infly/INF-34B-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "infly/INF-34B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "infly/INF-34B-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "infly/INF-34B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use infly/INF-34B-Base with Docker Model Runner:
docker model run hf.co/infly/INF-34B-Base
Update README.md
Browse files
README.md
CHANGED
|
@@ -19,7 +19,7 @@ license_link: LICENSE
|
|
| 19 |
</div>
|
| 20 |
|
| 21 |
<p align="center">
|
| 22 |
-
<a href="https://
|
| 23 |
</p>
|
| 24 |
|
| 25 |
|
|
@@ -132,9 +132,11 @@ Motivated by the idea of first training on relatively large but less polished co
|
|
| 132 |
|
| 133 |
### Installation
|
| 134 |
|
| 135 |
-
|
| 136 |
|
| 137 |
```shell
|
|
|
|
|
|
|
| 138 |
pip install -r requirements.txt
|
| 139 |
```
|
| 140 |
|
|
|
|
| 19 |
</div>
|
| 20 |
|
| 21 |
<p align="center">
|
| 22 |
+
<a href="https://s.infly.cn/f/img/pdf/inf_34b_tech_report.pdf"><b>Paper Link</b></a>
|
| 23 |
</p>
|
| 24 |
|
| 25 |
|
|
|
|
| 132 |
|
| 133 |
### Installation
|
| 134 |
|
| 135 |
+
Please clone our [GitHub](https://github.com/infly-ai/INF-LLM), and install the dependencies for `Python >= 3.8` by running the following command:
|
| 136 |
|
| 137 |
```shell
|
| 138 |
+
git clone https://github.com/infly-ai/INF-LLM
|
| 139 |
+
cd INF-LLM
|
| 140 |
pip install -r requirements.txt
|
| 141 |
```
|
| 142 |
|