Instructions to use Rexopia/HawkLM-demo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rexopia/HawkLM-demo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rexopia/HawkLM-demo", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Rexopia/HawkLM-demo", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rexopia/HawkLM-demo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rexopia/HawkLM-demo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rexopia/HawkLM-demo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Rexopia/HawkLM-demo
- SGLang
How to use Rexopia/HawkLM-demo 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 "Rexopia/HawkLM-demo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rexopia/HawkLM-demo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Rexopia/HawkLM-demo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rexopia/HawkLM-demo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Rexopia/HawkLM-demo with Docker Model Runner:
docker model run hf.co/Rexopia/HawkLM-demo
File size: 1,176 Bytes
f72f467 c48bee5 bec1dde c48bee5 6d0b7dd 658d5dc 6d0b7dd 658d5dc 6d0b7dd bec1dde 658d5dc bec1dde 4f28d2a bec1dde 6d0b7dd bec1dde 6d0b7dd 658d5dc 6d0b7dd 658d5dc 6d0b7dd 658d5dc 6d0b7dd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ---
license: apache-2.0
language:
- en
tags:
- hawk
pipeline_tag: text-generation
---
# HawkLM-demo
<p align="center">
<a href="https://huggingface.co/Rexopia/HawkLM-demo">HawkLM-demo 🤗</a>  | <a href="https://huggingface.co/Rexopia/HawkLM-Chat-demo">HawkLM-Chat-demo 🤗</a>
</p>
## Model Details
- **Developed by:** Rexopia
- **Reach me:** ruiji.zhang@outlook.com
- **Language(s):** English
- **License:** Apache license 2.0
- **Pretrained model:** True
- **Demo version:** True
## How to Get Started with the Model
Use the code below to get started with the model.
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("Rexopia/HawkLM-demo", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("Rexopia/HawkLM-demo", device_map="auto", trust_remote_code=True)
```
## Training Data
We sampled English-only corpus from Redpajama-1T datasets without any Arxiv and GitHub tags. As the demo version presented, we only trained 3.3Bil tokens.
## Evaluation
[More Information Needed]
## Citation
[More Information Needed]
## Model Card Contact
[More Information Needed]
|