Text Generation
Transformers
Safetensors
GGUF
English
qwen2
conversational
text-generation-inference
Instructions to use HelpingAI/Dhanishtha with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HelpingAI/Dhanishtha with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HelpingAI/Dhanishtha") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HelpingAI/Dhanishtha") model = AutoModelForCausalLM.from_pretrained("HelpingAI/Dhanishtha") 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]:])) - llama-cpp-python
How to use HelpingAI/Dhanishtha with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="HelpingAI/Dhanishtha", filename="AI4free_Dhanishtha-F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use HelpingAI/Dhanishtha with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf HelpingAI/Dhanishtha:F16 # Run inference directly in the terminal: llama-cli -hf HelpingAI/Dhanishtha:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf HelpingAI/Dhanishtha:F16 # Run inference directly in the terminal: llama-cli -hf HelpingAI/Dhanishtha:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf HelpingAI/Dhanishtha:F16 # Run inference directly in the terminal: ./llama-cli -hf HelpingAI/Dhanishtha:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf HelpingAI/Dhanishtha:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf HelpingAI/Dhanishtha:F16
Use Docker
docker model run hf.co/HelpingAI/Dhanishtha:F16
- LM Studio
- Jan
- vLLM
How to use HelpingAI/Dhanishtha with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HelpingAI/Dhanishtha" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HelpingAI/Dhanishtha", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HelpingAI/Dhanishtha:F16
- SGLang
How to use HelpingAI/Dhanishtha 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 "HelpingAI/Dhanishtha" \ --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": "HelpingAI/Dhanishtha", "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 "HelpingAI/Dhanishtha" \ --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": "HelpingAI/Dhanishtha", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use HelpingAI/Dhanishtha with Ollama:
ollama run hf.co/HelpingAI/Dhanishtha:F16
- Unsloth Studio new
How to use HelpingAI/Dhanishtha with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for HelpingAI/Dhanishtha to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for HelpingAI/Dhanishtha to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for HelpingAI/Dhanishtha to start chatting
- Docker Model Runner
How to use HelpingAI/Dhanishtha with Docker Model Runner:
docker model run hf.co/HelpingAI/Dhanishtha:F16
- Lemonade
How to use HelpingAI/Dhanishtha with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull HelpingAI/Dhanishtha:F16
Run and chat with the model
lemonade run user.Dhanishtha-F16
List all available models
lemonade list
Update tokenizer_config.json
Browse files- tokenizer_config.json +5 -5
tokenizer_config.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
| 12 |
"special": true
|
| 13 |
},
|
| 14 |
"151644": {
|
| 15 |
-
"content": "<
|
| 16 |
"lstrip": false,
|
| 17 |
"normalized": false,
|
| 18 |
"rstrip": false,
|
|
@@ -20,7 +20,7 @@
|
|
| 20 |
"special": false
|
| 21 |
},
|
| 22 |
"151645": {
|
| 23 |
-
"content": "<
|
| 24 |
"lstrip": false,
|
| 25 |
"normalized": false,
|
| 26 |
"rstrip": false,
|
|
@@ -44,7 +44,7 @@
|
|
| 44 |
"special": false
|
| 45 |
},
|
| 46 |
"151648": {
|
| 47 |
-
"content": "<
|
| 48 |
"lstrip": false,
|
| 49 |
"normalized": false,
|
| 50 |
"rstrip": false,
|
|
@@ -52,7 +52,7 @@
|
|
| 52 |
"special": false
|
| 53 |
},
|
| 54 |
"151649": {
|
| 55 |
-
"content": "</
|
| 56 |
"lstrip": false,
|
| 57 |
"normalized": false,
|
| 58 |
"rstrip": false,
|
|
@@ -181,7 +181,7 @@
|
|
| 181 |
}
|
| 182 |
},
|
| 183 |
"bos_token": "<|begin▁of▁sentence|>",
|
| 184 |
-
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<
|
| 185 |
"clean_up_tokenization_spaces": false,
|
| 186 |
"eos_token": "<|end▁of▁sentence|>",
|
| 187 |
"extra_special_tokens": {},
|
|
|
|
| 12 |
"special": true
|
| 13 |
},
|
| 14 |
"151644": {
|
| 15 |
+
"content": "<user>",
|
| 16 |
"lstrip": false,
|
| 17 |
"normalized": false,
|
| 18 |
"rstrip": false,
|
|
|
|
| 20 |
"special": false
|
| 21 |
},
|
| 22 |
"151645": {
|
| 23 |
+
"content": "<LLM>",
|
| 24 |
"lstrip": false,
|
| 25 |
"normalized": false,
|
| 26 |
"rstrip": false,
|
|
|
|
| 44 |
"special": false
|
| 45 |
},
|
| 46 |
"151648": {
|
| 47 |
+
"content": "<manthan>",
|
| 48 |
"lstrip": false,
|
| 49 |
"normalized": false,
|
| 50 |
"rstrip": false,
|
|
|
|
| 52 |
"special": false
|
| 53 |
},
|
| 54 |
"151649": {
|
| 55 |
+
"content": "</manthan>",
|
| 56 |
"lstrip": false,
|
| 57 |
"normalized": false,
|
| 58 |
"rstrip": false,
|
|
|
|
| 181 |
}
|
| 182 |
},
|
| 183 |
"bos_token": "<|begin▁of▁sentence|>",
|
| 184 |
+
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<user>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<LLM><|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{%- set ns.is_first = true -%}{%- else %}{{'\\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- if ns.is_tool %}{{'<|tool▁outputs▁end|>' + message['content'] + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{% if '</manthan>' in content %}{% set content = content.split('</manthan>')[-1] %}{% endif %}{{'<LLM>' + content + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<|tool▁outputs▁begin|><|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{'\\n<|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<|tool▁outputs▁end|>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<LLM>'}}{% endif %}",
|
| 185 |
"clean_up_tokenization_spaces": false,
|
| 186 |
"eos_token": "<|end▁of▁sentence|>",
|
| 187 |
"extra_special_tokens": {},
|