Instructions to use Yukang/Llama-2-7b-longlora-16k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Yukang/Llama-2-7b-longlora-16k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Yukang/Llama-2-7b-longlora-16k")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Yukang/Llama-2-7b-longlora-16k") model = AutoModelForCausalLM.from_pretrained("Yukang/Llama-2-7b-longlora-16k", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Yukang/Llama-2-7b-longlora-16k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Yukang/Llama-2-7b-longlora-16k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yukang/Llama-2-7b-longlora-16k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Yukang/Llama-2-7b-longlora-16k
- SGLang
How to use Yukang/Llama-2-7b-longlora-16k 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 "Yukang/Llama-2-7b-longlora-16k" \ --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": "Yukang/Llama-2-7b-longlora-16k", "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 "Yukang/Llama-2-7b-longlora-16k" \ --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": "Yukang/Llama-2-7b-longlora-16k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Yukang/Llama-2-7b-longlora-16k with Docker Model Runner:
docker model run hf.co/Yukang/Llama-2-7b-longlora-16k
Upload README.md
Browse files
README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
| 1 |
-
[](https://b3cfcf9e79ff42df5f.gradio.live)
|
| 2 |
-
|
| 3 |
# LongLoRA: Efficient Fine-tuning of Long-Context Large Language Models
|
| 4 |
|
| 5 |
-
<font size=6><div align='center' > <a href=http://arxiv.org/abs/2309.12307>**Paper**</a> | <a href="https://huggingface.co/Yukang">**Models**</a> | <a href="https://github.com/dvlab-research/LongLoRA">**Code**</a>
|
| 6 |
|
| 7 |
**LongLoRA: Efficient Fine-tuning of Long-Context Large Language Models [[Paper](http://arxiv.org/abs/2309.12307)]** <br />
|
| 8 |
[Yukang Chen](https://scholar.google.com/citations?user=6p0ygKUAAAAJ&hl=en),
|
|
|
|
|
|
|
|
|
|
| 1 |
# LongLoRA: Efficient Fine-tuning of Long-Context Large Language Models
|
| 2 |
|
| 3 |
+
<font size=6><div align='center' > <a href=http://arxiv.org/abs/2309.12307>**Paper**</a> | <a href="https://huggingface.co/Yukang">**Models**</a> | <a href="https://github.com/dvlab-research/LongLoRA">**Code**</a> </div></font>
|
| 4 |
|
| 5 |
**LongLoRA: Efficient Fine-tuning of Long-Context Large Language Models [[Paper](http://arxiv.org/abs/2309.12307)]** <br />
|
| 6 |
[Yukang Chen](https://scholar.google.com/citations?user=6p0ygKUAAAAJ&hl=en),
|