Transformers
PyTorch
Safetensors
GGUF
English
qwen2
text-generation-inference
unsloth
trl
sft
conversational
Instructions to use yasserrmd/deepseek-esg-assistant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yasserrmd/deepseek-esg-assistant with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("yasserrmd/deepseek-esg-assistant", dtype="auto") - llama-cpp-python
How to use yasserrmd/deepseek-esg-assistant with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="yasserrmd/deepseek-esg-assistant", filename="unsloth.F16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use yasserrmd/deepseek-esg-assistant with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf yasserrmd/deepseek-esg-assistant:Q4_K_M # Run inference directly in the terminal: llama-cli -hf yasserrmd/deepseek-esg-assistant:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf yasserrmd/deepseek-esg-assistant:Q4_K_M # Run inference directly in the terminal: llama-cli -hf yasserrmd/deepseek-esg-assistant:Q4_K_M
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 yasserrmd/deepseek-esg-assistant:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf yasserrmd/deepseek-esg-assistant:Q4_K_M
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 yasserrmd/deepseek-esg-assistant:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf yasserrmd/deepseek-esg-assistant:Q4_K_M
Use Docker
docker model run hf.co/yasserrmd/deepseek-esg-assistant:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use yasserrmd/deepseek-esg-assistant with Ollama:
ollama run hf.co/yasserrmd/deepseek-esg-assistant:Q4_K_M
- Unsloth Studio new
How to use yasserrmd/deepseek-esg-assistant 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 yasserrmd/deepseek-esg-assistant 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 yasserrmd/deepseek-esg-assistant to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for yasserrmd/deepseek-esg-assistant to start chatting
- Docker Model Runner
How to use yasserrmd/deepseek-esg-assistant with Docker Model Runner:
docker model run hf.co/yasserrmd/deepseek-esg-assistant:Q4_K_M
- Lemonade
How to use yasserrmd/deepseek-esg-assistant with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull yasserrmd/deepseek-esg-assistant:Q4_K_M
Run and chat with the model
lemonade run user.deepseek-esg-assistant-Q4_K_M
List all available models
lemonade list
Fix chat_template crash when assistant message omits the `content` key
#2
by qgallouedec HF Staff - opened
- tokenizer_config.json +2 -2
tokenizer_config.json
CHANGED
|
@@ -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 -%}{{'<|User|>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message
|
| 185 |
"clean_up_tokenization_spaces": false,
|
| 186 |
"eos_token": "<|end▁of▁sentence|>",
|
| 187 |
"extra_special_tokens": {},
|
|
@@ -193,4 +193,4 @@
|
|
| 193 |
"tokenizer_class": "LlamaTokenizer",
|
| 194 |
"unk_token": null,
|
| 195 |
"use_default_system_prompt": false
|
| 196 |
-
}
|
|
|
|
| 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.get('content') is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<|Assistant|><|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 '</think>' in content %}{% set content = content.split('</think>')[-1] %}{% endif %}{{'<|Assistant|>' + 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 %}{{'<|Assistant|>'}}{% endif %}",
|
| 185 |
"clean_up_tokenization_spaces": false,
|
| 186 |
"eos_token": "<|end▁of▁sentence|>",
|
| 187 |
"extra_special_tokens": {},
|
|
|
|
| 193 |
"tokenizer_class": "LlamaTokenizer",
|
| 194 |
"unk_token": null,
|
| 195 |
"use_default_system_prompt": false
|
| 196 |
+
}
|