Instructions to use AlumiK/LingLong-317M-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlumiK/LingLong-317M-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AlumiK/LingLong-317M-Chat", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("AlumiK/LingLong-317M-Chat", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AlumiK/LingLong-317M-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AlumiK/LingLong-317M-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlumiK/LingLong-317M-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AlumiK/LingLong-317M-Chat
- SGLang
How to use AlumiK/LingLong-317M-Chat 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 "AlumiK/LingLong-317M-Chat" \ --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": "AlumiK/LingLong-317M-Chat", "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 "AlumiK/LingLong-317M-Chat" \ --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": "AlumiK/LingLong-317M-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AlumiK/LingLong-317M-Chat with Docker Model Runner:
docker model run hf.co/AlumiK/LingLong-317M-Chat
update docs
Browse files
README.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- zh
|
| 5 |
+
license: gpl-3.0
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
---
|
| 8 |
+
# LingLong (玲珑): A Small-Scale Chinese PreTrained Language Model
|
| 9 |
+
|
| 10 |
+
This is LingLong (玲珑), a Chinese pretrained language model trained by the College of Software at Nankai University.
|
| 11 |
+
Built on the foundation of the GPT-3 architecture, it has been meticulously trained on a vast collection of private
|
| 12 |
+
datasets.
|
| 13 |
+
With a modest parameter count of only 317 million, LingLong is significantly smaller than the original GPT-3 model, yet
|
| 14 |
+
it delivers impressive results across various NLP tasks.
|
| 15 |
+
In Chinese, "玲珑" translates to "exquisite" or "delicate," which perfectly embodies the small yet mighty nature of this
|
| 16 |
+
model.
|
| 17 |
+
Therefore, we chose to name it "LingLong" in honor of its exceptional precision and finesse.
|
| 18 |
+
|
| 19 |
+
Although it's true that this model's performance isn't on par with the large pretrained language models boasting
|
| 20 |
+
hundreds of billions of parameters, its relatively low parameter count makes it accessible to researchers with limited
|
| 21 |
+
computing resources.
|
| 22 |
+
As a result, this model serves as an excellent foundation for conducting follow-up research, such as fine-tuning.
|
| 23 |
+
By utilizing this model, researchers can begin to delve into the intricacies of pretrained language models and to
|
| 24 |
+
unravel the mysteries of language processing without the need for excessive computational resources.
|
| 25 |
+
|
| 26 |
+
This is the chat version of [LingLong-317M](https://huggingface.co/AlumiK/LingLong-317M)
|