Text Generation
Transformers
PyTorch
llama
instruction-tuning
text-generation-inference
text2text-generation
Instructions to use akoksal/LongForm-LLaMA-7B-diff with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use akoksal/LongForm-LLaMA-7B-diff with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="akoksal/LongForm-LLaMA-7B-diff")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("akoksal/LongForm-LLaMA-7B-diff") model = AutoModelForCausalLM.from_pretrained("akoksal/LongForm-LLaMA-7B-diff", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use akoksal/LongForm-LLaMA-7B-diff with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "akoksal/LongForm-LLaMA-7B-diff" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "akoksal/LongForm-LLaMA-7B-diff", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/akoksal/LongForm-LLaMA-7B-diff
- SGLang
How to use akoksal/LongForm-LLaMA-7B-diff 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 "akoksal/LongForm-LLaMA-7B-diff" \ --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": "akoksal/LongForm-LLaMA-7B-diff", "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 "akoksal/LongForm-LLaMA-7B-diff" \ --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": "akoksal/LongForm-LLaMA-7B-diff", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use akoksal/LongForm-LLaMA-7B-diff with Docker Model Runner:
docker model run hf.co/akoksal/LongForm-LLaMA-7B-diff
Update README.md
Browse files
README.md
CHANGED
|
@@ -103,11 +103,19 @@ We provide in-depth evaluation of LongForm models and baselines in the paper. We
|
|
| 103 |
| [**LongForm-OPT-6.7B**](https://huggingface.co/akoksal/LongForm-OPT-6.7B) | 17.7 | 16.9 | 17.2 | 19.0 |
|
| 104 |
| [**LongForm-LLaMA-7B**](https://huggingface.co/akoksal/LongForm-LLaMA-7B-diff)‡ | **19.7** | **21.7** | **18.6** | 18.9 |
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
‡: We can just release the difference between LongForm-LLaMA-7B and pretrained LLaMA-7B publicly due to restrictions of LLaMA models.
|
| 107 |
|
| 108 |
## Limitations
|
| 109 |
The LongForm dataset and models mainly focus on long text generation and have limitations regarding structured prediction tasks in NLP. Additionally, we observe that LongForm models may present hallucination problems similar to those found in LLMs.
|
| 110 |
|
|
|
|
|
|
|
|
|
|
| 111 |
## Citation
|
| 112 |
```
|
| 113 |
@misc{koksal2023longform,
|
|
|
|
| 103 |
| [**LongForm-OPT-6.7B**](https://huggingface.co/akoksal/LongForm-OPT-6.7B) | 17.7 | 16.9 | 17.2 | 19.0 |
|
| 104 |
| [**LongForm-LLaMA-7B**](https://huggingface.co/akoksal/LongForm-LLaMA-7B-diff)‡ | **19.7** | **21.7** | **18.6** | 18.9 |
|
| 105 |
|
| 106 |
+
Smaller versions of LongForm-OPT models are also available:
|
| 107 |
+
- [**LongForm-OPT-1.3B**](https://huggingface.co/akoksal/LongForm-OPT-1.3B)
|
| 108 |
+
- [**LongForm-OPT-350M**](https://huggingface.co/akoksal/LongForm-OPT-350M)
|
| 109 |
+
- [**LongForm-OPT-125M**](https://huggingface.co/akoksal/LongForm-OPT-125M)
|
| 110 |
+
|
| 111 |
‡: We can just release the difference between LongForm-LLaMA-7B and pretrained LLaMA-7B publicly due to restrictions of LLaMA models.
|
| 112 |
|
| 113 |
## Limitations
|
| 114 |
The LongForm dataset and models mainly focus on long text generation and have limitations regarding structured prediction tasks in NLP. Additionally, we observe that LongForm models may present hallucination problems similar to those found in LLMs.
|
| 115 |
|
| 116 |
+
## License
|
| 117 |
+
The LongForm project is subject to a MIT License with custom limitations for restrictions imposed by OpenAI (for the instruction generation part), as well as the license of language models (OPT, LLaMA, and T5).
|
| 118 |
+
|
| 119 |
## Citation
|
| 120 |
```
|
| 121 |
@misc{koksal2023longform,
|