Instructions to use amazon/FalconLite2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amazon/FalconLite2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amazon/FalconLite2", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("amazon/FalconLite2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use amazon/FalconLite2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amazon/FalconLite2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amazon/FalconLite2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/amazon/FalconLite2
- SGLang
How to use amazon/FalconLite2 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 "amazon/FalconLite2" \ --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": "amazon/FalconLite2", "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 "amazon/FalconLite2" \ --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": "amazon/FalconLite2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use amazon/FalconLite2 with Docker Model Runner:
docker model run hf.co/amazon/FalconLite2
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,7 +11,7 @@ FalconLite2 evolves from [FalconLite](https://huggingface.co/amazon/FalconLite),
|
|
| 11 |
|Model|Fine-tuned on long contexts| Quantization | Max context length| RotaryEmbedding adaptation| Inference framework|
|
| 12 |
|----------|-------------:|-------------:|------------:|-----------:|-----------:|
|
| 13 |
| FalconLite | No | 4-bit GPTQ |12K | [dNTK](https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/) | TGI 0.9.2 |
|
| 14 |
-
| FalconLite2 | Yes | 4-bit GPTQ |24K | rope_theta = 1000000 | TGI 1.0.3 |
|
| 15 |
|
| 16 |
## Model Details
|
| 17 |
|
|
@@ -38,6 +38,15 @@ cd falconlite-dev/falconlite2
|
|
| 38 |
./docker_build.sh
|
| 39 |
./start_falconlite.sh
|
| 40 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
### Perform inference
|
| 42 |
```bash
|
| 43 |
# after FalconLite has been completely started
|
|
|
|
| 11 |
|Model|Fine-tuned on long contexts| Quantization | Max context length| RotaryEmbedding adaptation| Inference framework|
|
| 12 |
|----------|-------------:|-------------:|------------:|-----------:|-----------:|
|
| 13 |
| FalconLite | No | 4-bit GPTQ |12K | [dNTK](https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/) | TGI 0.9.2 |
|
| 14 |
+
| FalconLite2 | Yes | 4-bit GPTQ |24K | rope_theta = 1000000 | TGI 1.0.3 & TGI 1.1.0 |
|
| 15 |
|
| 16 |
## Model Details
|
| 17 |
|
|
|
|
| 38 |
./docker_build.sh
|
| 39 |
./start_falconlite.sh
|
| 40 |
```
|
| 41 |
+
### Start TGI server-1.1.0
|
| 42 |
+
```bash
|
| 43 |
+
git clone https://github.com/awslabs/extending-the-context-length-of-open-source-llms.git falconlite-dev
|
| 44 |
+
cd falconlite-dev/falconlite2-tgi1.1.0
|
| 45 |
+
# this may take a while to build updated vLLM CUDA kernels
|
| 46 |
+
./docker_build_rebuild_vllm_rope-theta.sh
|
| 47 |
+
./start_falconlite.sh
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
### Perform inference
|
| 51 |
```bash
|
| 52 |
# after FalconLite has been completely started
|