Text Generation
Transformers
Safetensors
English
llama
math
tulu
trl
text-generation-inference
math_lingo
conversational
Instructions to use prithivMLmods/Tulu-MathLingo-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Tulu-MathLingo-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/Tulu-MathLingo-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Tulu-MathLingo-8B") model = AutoModelForCausalLM.from_pretrained("prithivMLmods/Tulu-MathLingo-8B") 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 prithivMLmods/Tulu-MathLingo-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Tulu-MathLingo-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Tulu-MathLingo-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/Tulu-MathLingo-8B
- SGLang
How to use prithivMLmods/Tulu-MathLingo-8B 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 "prithivMLmods/Tulu-MathLingo-8B" \ --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": "prithivMLmods/Tulu-MathLingo-8B", "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 "prithivMLmods/Tulu-MathLingo-8B" \ --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": "prithivMLmods/Tulu-MathLingo-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/Tulu-MathLingo-8B with Docker Model Runner:
docker model run hf.co/prithivMLmods/Tulu-MathLingo-8B
Update README.md
Browse files
README.md
CHANGED
|
@@ -16,4 +16,23 @@ tags:
|
|
| 16 |
- llama
|
| 17 |
- text-generation-inference
|
| 18 |
- math_lingo
|
| 19 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
- llama
|
| 17 |
- text-generation-inference
|
| 18 |
- math_lingo
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Tulu-MathLingo-8B Model Files
|
| 22 |
+
|
| 23 |
+
| **File Name** | **Size** | **Description** | **Upload Status** |
|
| 24 |
+
|-----------------------------------|--------------|------------------------------------------------|-------------------|
|
| 25 |
+
| `.gitattributes` | 1.57 kB | Configures LFS tracking for large files. | Updated |
|
| 26 |
+
| `README.md` | 292 Bytes | Basic details about the uploaded model. | Updated |
|
| 27 |
+
| `config.json` | 988 Bytes | Contains model architecture and metadata. | Uploaded |
|
| 28 |
+
| `generation_config.json` | 241 Bytes | Parameters for text generation (e.g., length, temperature). | Uploaded |
|
| 29 |
+
| `model-00001-of-00004.safetensors`| 4.98 GB | Part 1 of model weights. | Uploaded (LFS) |
|
| 30 |
+
| `model-00002-of-00004.safetensors`| 5 GB | Part 2 of model weights. | Uploaded (LFS) |
|
| 31 |
+
| `model-00003-of-00004.safetensors`| 4.92 GB | Part 3 of model weights. | Uploaded (LFS) |
|
| 32 |
+
| `model-00004-of-00004.safetensors`| 1.17 GB | Part 4 of model weights. | Uploaded (LFS) |
|
| 33 |
+
| `model.safetensors.index.json` | 25.4 kB | Index file for multi-part model weights. | Uploaded |
|
| 34 |
+
| `special_tokens_map.json` | 462 Bytes | Maps special tokens (e.g., `<PAD>`, `<EOS>`). | Uploaded |
|
| 35 |
+
| `tokenizer.json` | 17.2 MB | Full tokenizer configuration. | Uploaded (LFS) |
|
| 36 |
+
| `tokenizer_config.json` | 57.6 kB | Metadata for tokenizer usage. | Uploaded |
|
| 37 |
+
|
| 38 |
+
---
|