Instructions to use BEE-spoke-data/Qwen2-1.5B-stepbasin-books with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BEE-spoke-data/Qwen2-1.5B-stepbasin-books with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BEE-spoke-data/Qwen2-1.5B-stepbasin-books")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BEE-spoke-data/Qwen2-1.5B-stepbasin-books") model = AutoModelForCausalLM.from_pretrained("BEE-spoke-data/Qwen2-1.5B-stepbasin-books") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BEE-spoke-data/Qwen2-1.5B-stepbasin-books with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BEE-spoke-data/Qwen2-1.5B-stepbasin-books" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BEE-spoke-data/Qwen2-1.5B-stepbasin-books", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BEE-spoke-data/Qwen2-1.5B-stepbasin-books
- SGLang
How to use BEE-spoke-data/Qwen2-1.5B-stepbasin-books 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 "BEE-spoke-data/Qwen2-1.5B-stepbasin-books" \ --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": "BEE-spoke-data/Qwen2-1.5B-stepbasin-books", "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 "BEE-spoke-data/Qwen2-1.5B-stepbasin-books" \ --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": "BEE-spoke-data/Qwen2-1.5B-stepbasin-books", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BEE-spoke-data/Qwen2-1.5B-stepbasin-books with Docker Model Runner:
docker model run hf.co/BEE-spoke-data/Qwen2-1.5B-stepbasin-books
Qwen2-1.5B-stepbasin-books
this was finetuned at 16384 context length
This is an experiment on long context text generation (i.e. 6k+ tokens generated) to evaluate if/when generation breaks down, etc. As such, all the data on which this model has been fine-tuned are full-length books.
Details
This model is a fine-tuned version of Qwen/Qwen2-1.5B on https://github.com/stepbasin/books/tree/master/books
It achieves the following results on the evaluation set:
- Loss: 2.8110
- Accuracy: 0.4298
- Num Input Tokens Seen: 44040192
- Downloads last month
- 6
Model tree for BEE-spoke-data/Qwen2-1.5B-stepbasin-books
Base model
Qwen/Qwen2-1.5B