Instructions to use curiousily/tiny-crypto-sentiment-analysis with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use curiousily/tiny-crypto-sentiment-analysis with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="curiousily/tiny-crypto-sentiment-analysis")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("curiousily/tiny-crypto-sentiment-analysis") model = AutoModelForCausalLM.from_pretrained("curiousily/tiny-crypto-sentiment-analysis") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use curiousily/tiny-crypto-sentiment-analysis with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "curiousily/tiny-crypto-sentiment-analysis" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "curiousily/tiny-crypto-sentiment-analysis", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/curiousily/tiny-crypto-sentiment-analysis
- SGLang
How to use curiousily/tiny-crypto-sentiment-analysis 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 "curiousily/tiny-crypto-sentiment-analysis" \ --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": "curiousily/tiny-crypto-sentiment-analysis", "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 "curiousily/tiny-crypto-sentiment-analysis" \ --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": "curiousily/tiny-crypto-sentiment-analysis", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use curiousily/tiny-crypto-sentiment-analysis with Docker Model Runner:
docker model run hf.co/curiousily/tiny-crypto-sentiment-analysis
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,6 +12,10 @@ base_model: TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
|
|
| 12 |
Fine-tuned (with LoRA) version of [TinyLlama](https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T) on cryptocurrency news articles
|
| 13 |
to predict the sentiment and subject of an article. The dataset used is [Crypto News+](https://www.kaggle.com/datasets/oliviervha/crypto-news/).
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
## How to Use
|
| 16 |
|
| 17 |
Load the model:
|
|
|
|
| 12 |
Fine-tuned (with LoRA) version of [TinyLlama](https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T) on cryptocurrency news articles
|
| 13 |
to predict the sentiment and subject of an article. The dataset used is [Crypto News+](https://www.kaggle.com/datasets/oliviervha/crypto-news/).
|
| 14 |
|
| 15 |
+
## How to Train Your Own Tiny LLM?
|
| 16 |
+
|
| 17 |
+
Follow the complete tutorial on how this model was trained: https://www.mlexpert.io/bootcamp/fine-tuning-tiny-llm-on-custom-dataset
|
| 18 |
+
|
| 19 |
## How to Use
|
| 20 |
|
| 21 |
Load the model:
|