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 tokenizer
Browse files- tokenizer.json +1 -33
- tokenizer_config.json +1 -1
tokenizer.json
CHANGED
|
@@ -1,11 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
"direction": "Right",
|
| 5 |
-
"max_length": 1024,
|
| 6 |
-
"strategy": "LongestFirst",
|
| 7 |
-
"stride": 0
|
| 8 |
-
},
|
| 9 |
"padding": null,
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
|
@@ -76,12 +71,6 @@
|
|
| 76 |
"id": "A",
|
| 77 |
"type_id": 0
|
| 78 |
}
|
| 79 |
-
},
|
| 80 |
-
{
|
| 81 |
-
"SpecialToken": {
|
| 82 |
-
"id": "</s>",
|
| 83 |
-
"type_id": 0
|
| 84 |
-
}
|
| 85 |
}
|
| 86 |
],
|
| 87 |
"pair": [
|
|
@@ -97,12 +86,6 @@
|
|
| 97 |
"type_id": 0
|
| 98 |
}
|
| 99 |
},
|
| 100 |
-
{
|
| 101 |
-
"SpecialToken": {
|
| 102 |
-
"id": "</s>",
|
| 103 |
-
"type_id": 0
|
| 104 |
-
}
|
| 105 |
-
},
|
| 106 |
{
|
| 107 |
"SpecialToken": {
|
| 108 |
"id": "<s>",
|
|
@@ -114,24 +97,9 @@
|
|
| 114 |
"id": "B",
|
| 115 |
"type_id": 1
|
| 116 |
}
|
| 117 |
-
},
|
| 118 |
-
{
|
| 119 |
-
"SpecialToken": {
|
| 120 |
-
"id": "</s>",
|
| 121 |
-
"type_id": 1
|
| 122 |
-
}
|
| 123 |
}
|
| 124 |
],
|
| 125 |
"special_tokens": {
|
| 126 |
-
"</s>": {
|
| 127 |
-
"id": "</s>",
|
| 128 |
-
"ids": [
|
| 129 |
-
2
|
| 130 |
-
],
|
| 131 |
-
"tokens": [
|
| 132 |
-
"</s>"
|
| 133 |
-
]
|
| 134 |
-
},
|
| 135 |
"<s>": {
|
| 136 |
"id": "<s>",
|
| 137 |
"ids": [
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
|
|
|
| 71 |
"id": "A",
|
| 72 |
"type_id": 0
|
| 73 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
}
|
| 75 |
],
|
| 76 |
"pair": [
|
|
|
|
| 86 |
"type_id": 0
|
| 87 |
}
|
| 88 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
{
|
| 90 |
"SpecialToken": {
|
| 91 |
"id": "<s>",
|
|
|
|
| 97 |
"id": "B",
|
| 98 |
"type_id": 1
|
| 99 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
}
|
| 101 |
],
|
| 102 |
"special_tokens": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
"<s>": {
|
| 104 |
"id": "<s>",
|
| 105 |
"ids": [
|
tokenizer_config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
-
"add_eos_token":
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
|
|
|
| 1 |
{
|
| 2 |
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|