Text Generation
Transformers
Safetensors
English
llama4_text
finance
financial-sentiment
sentiment-analysis
chain-of-thought
reasoning
grpo
sft
lora
finsenti
conversational
Instructions to use Ayansk11/FinSenti-MobileLLM-R1-950M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ayansk11/FinSenti-MobileLLM-R1-950M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ayansk11/FinSenti-MobileLLM-R1-950M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ayansk11/FinSenti-MobileLLM-R1-950M") model = AutoModelForCausalLM.from_pretrained("Ayansk11/FinSenti-MobileLLM-R1-950M", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Ayansk11/FinSenti-MobileLLM-R1-950M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ayansk11/FinSenti-MobileLLM-R1-950M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ayansk11/FinSenti-MobileLLM-R1-950M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ayansk11/FinSenti-MobileLLM-R1-950M
- SGLang
How to use Ayansk11/FinSenti-MobileLLM-R1-950M 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 "Ayansk11/FinSenti-MobileLLM-R1-950M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ayansk11/FinSenti-MobileLLM-R1-950M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Ayansk11/FinSenti-MobileLLM-R1-950M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ayansk11/FinSenti-MobileLLM-R1-950M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Ayansk11/FinSenti-MobileLLM-R1-950M with Docker Model Runner:
docker model run hf.co/Ayansk11/FinSenti-MobileLLM-R1-950M
Upload folder using huggingface_hub
Browse files- config.json +7 -3
- generation_config.json +0 -2
- model.safetensors +1 -1
config.json
CHANGED
|
@@ -9,7 +9,11 @@
|
|
| 9 |
"attn_temperature_tuning": false,
|
| 10 |
"bos_token_id": 128000,
|
| 11 |
"dtype": "bfloat16",
|
| 12 |
-
"eos_token_id":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
"floor_scale": 8192,
|
| 14 |
"for_llm_compressor": false,
|
| 15 |
"head_dim": 64,
|
|
@@ -76,7 +80,7 @@
|
|
| 76 |
"num_key_value_heads": 6,
|
| 77 |
"num_local_experts": 0,
|
| 78 |
"output_router_logits": false,
|
| 79 |
-
"pad_token_id":
|
| 80 |
"rms_norm_eps": 1e-05,
|
| 81 |
"rope_parameters": {
|
| 82 |
"rope_theta": 8000000.0,
|
|
@@ -86,7 +90,7 @@
|
|
| 86 |
"router_jitter_noise": 0.0,
|
| 87 |
"tie_word_embeddings": false,
|
| 88 |
"transformers_version": "5.2.0",
|
| 89 |
-
"use_cache":
|
| 90 |
"use_qk_norm": true,
|
| 91 |
"vocab_size": 128257
|
| 92 |
}
|
|
|
|
| 9 |
"attn_temperature_tuning": false,
|
| 10 |
"bos_token_id": 128000,
|
| 11 |
"dtype": "bfloat16",
|
| 12 |
+
"eos_token_id": [
|
| 13 |
+
128001,
|
| 14 |
+
128008,
|
| 15 |
+
128009
|
| 16 |
+
],
|
| 17 |
"floor_scale": 8192,
|
| 18 |
"for_llm_compressor": false,
|
| 19 |
"head_dim": 64,
|
|
|
|
| 80 |
"num_key_value_heads": 6,
|
| 81 |
"num_local_experts": 0,
|
| 82 |
"output_router_logits": false,
|
| 83 |
+
"pad_token_id": null,
|
| 84 |
"rms_norm_eps": 1e-05,
|
| 85 |
"rope_parameters": {
|
| 86 |
"rope_theta": 8000000.0,
|
|
|
|
| 90 |
"router_jitter_noise": 0.0,
|
| 91 |
"tie_word_embeddings": false,
|
| 92 |
"transformers_version": "5.2.0",
|
| 93 |
+
"use_cache": true,
|
| 94 |
"use_qk_norm": true,
|
| 95 |
"vocab_size": 128257
|
| 96 |
}
|
generation_config.json
CHANGED
|
@@ -3,12 +3,10 @@
|
|
| 3 |
"bos_token_id": 128000,
|
| 4 |
"cache_implementation": "dynamic",
|
| 5 |
"eos_token_id": [
|
| 6 |
-
128009,
|
| 7 |
128001,
|
| 8 |
128008,
|
| 9 |
128009
|
| 10 |
],
|
| 11 |
-
"pad_token_id": 128256,
|
| 12 |
"tie_word_embeddings": false,
|
| 13 |
"transformers_version": "5.2.0"
|
| 14 |
}
|
|
|
|
| 3 |
"bos_token_id": 128000,
|
| 4 |
"cache_implementation": "dynamic",
|
| 5 |
"eos_token_id": [
|
|
|
|
| 6 |
128001,
|
| 7 |
128008,
|
| 8 |
128009
|
| 9 |
],
|
|
|
|
| 10 |
"tie_word_embeddings": false,
|
| 11 |
"transformers_version": "5.2.0"
|
| 12 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2293403880
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c214a8311ecadfabfb8636eb0e96258257ac240d2b7e1bc698a39288e6de9db9
|
| 3 |
size 2293403880
|