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
- 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
Upload LlamaForCausalLM
Browse files- README.md +1 -1
- config.json +1 -1
- generation_config.json +1 -1
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
tags:
|
| 4 |
- finance
|
| 5 |
-
license: apache-2.0
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
---
|
| 8 |
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
library_name: transformers
|
| 4 |
tags:
|
| 5 |
- finance
|
|
|
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
---
|
| 8 |
|
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
generation_config.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
| 2 |
"bos_token_id": 1,
|
| 3 |
"eos_token_id": 2,
|
| 4 |
"max_length": 2048,
|
| 5 |
-
"pad_token_id":
|
| 6 |
"transformers_version": "4.37.2"
|
| 7 |
}
|
|
|
|
| 2 |
"bos_token_id": 1,
|
| 3 |
"eos_token_id": 2,
|
| 4 |
"max_length": 2048,
|
| 5 |
+
"pad_token_id": 0,
|
| 6 |
"transformers_version": "4.37.2"
|
| 7 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2200185200
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3641b82a7485a937ae7c95a39e81fca932df93b198823ed247b26ac082277007
|
| 3 |
size 2200185200
|