Text Generation
Transformers
Safetensors
GGUF
stablelm
HelpingAI
Emotionally Intelligent
EQ
conversational
imatrix
Instructions to use OEvortex/HelpingAI-3B-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OEvortex/HelpingAI-3B-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OEvortex/HelpingAI-3B-chat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OEvortex/HelpingAI-3B-chat") model = AutoModelForCausalLM.from_pretrained("OEvortex/HelpingAI-3B-chat") 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 OEvortex/HelpingAI-3B-chat with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="OEvortex/HelpingAI-3B-chat", filename="helpingai-3b-chat-iq4_xs-imat.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use OEvortex/HelpingAI-3B-chat with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf OEvortex/HelpingAI-3B-chat:IQ4_XS # Run inference directly in the terminal: llama-cli -hf OEvortex/HelpingAI-3B-chat:IQ4_XS
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf OEvortex/HelpingAI-3B-chat:IQ4_XS # Run inference directly in the terminal: llama-cli -hf OEvortex/HelpingAI-3B-chat:IQ4_XS
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 OEvortex/HelpingAI-3B-chat:IQ4_XS # Run inference directly in the terminal: ./llama-cli -hf OEvortex/HelpingAI-3B-chat:IQ4_XS
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 OEvortex/HelpingAI-3B-chat:IQ4_XS # Run inference directly in the terminal: ./build/bin/llama-cli -hf OEvortex/HelpingAI-3B-chat:IQ4_XS
Use Docker
docker model run hf.co/OEvortex/HelpingAI-3B-chat:IQ4_XS
- LM Studio
- Jan
- vLLM
How to use OEvortex/HelpingAI-3B-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OEvortex/HelpingAI-3B-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OEvortex/HelpingAI-3B-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OEvortex/HelpingAI-3B-chat:IQ4_XS
- SGLang
How to use OEvortex/HelpingAI-3B-chat 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 "OEvortex/HelpingAI-3B-chat" \ --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": "OEvortex/HelpingAI-3B-chat", "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 "OEvortex/HelpingAI-3B-chat" \ --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": "OEvortex/HelpingAI-3B-chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use OEvortex/HelpingAI-3B-chat with Ollama:
ollama run hf.co/OEvortex/HelpingAI-3B-chat:IQ4_XS
- Unsloth Studio new
How to use OEvortex/HelpingAI-3B-chat 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 OEvortex/HelpingAI-3B-chat 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 OEvortex/HelpingAI-3B-chat to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for OEvortex/HelpingAI-3B-chat to start chatting
- Docker Model Runner
How to use OEvortex/HelpingAI-3B-chat with Docker Model Runner:
docker model run hf.co/OEvortex/HelpingAI-3B-chat:IQ4_XS
- Lemonade
How to use OEvortex/HelpingAI-3B-chat with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull OEvortex/HelpingAI-3B-chat:IQ4_XS
Run and chat with the model
lemonade run user.HelpingAI-3B-chat-IQ4_XS
List all available models
lemonade list
| import json | |
| from typing import List, Optional, Tuple | |
| from tokenizers import pre_tokenizers, processors | |
| from transformers.tokenization_utils_fast import PreTrainedTokenizerFast | |
| from transformers.utils import logging | |
| logger = logging.get_logger(__name__) | |
| VOCAB_FILES_NAMES = {"vocab_file": "vocab.json", "merges_file": "merges.txt", "tokenizer_file": "tokenizer.json"} | |
| class HelpingAITokenizerFast(PreTrainedTokenizerFast): | |
| vocab_files_names = VOCAB_FILES_NAMES | |
| model_input_names = ["input_ids", "attention_mask"] | |
| def __init__( | |
| self, | |
| vocab_file=None, | |
| merges_file=None, | |
| tokenizer_file=None, | |
| unk_token="<|endoftext|>", | |
| bos_token="<|im_start|>", | |
| eos_token="<|im_end|>", | |
| pad_token="<|im_end|>", | |
| add_bos_token=False, | |
| add_eos_token=False, | |
| add_prefix_space=False, | |
| **kwargs, | |
| ): | |
| super().__init__( | |
| vocab_file, | |
| merges_file, | |
| tokenizer_file=tokenizer_file, | |
| unk_token=unk_token, | |
| bos_token=bos_token, | |
| eos_token=eos_token, | |
| pad_token=pad_token, | |
| add_bos_token=add_bos_token, | |
| add_eos_token=add_eos_token, | |
| add_prefix_space=add_prefix_space, | |
| **kwargs, | |
| ) | |
| self._add_bos_token = add_bos_token | |
| self._add_eos_token = add_eos_token | |
| self.update_post_processor() | |
| pre_tok_state = json.loads(self.backend_tokenizer.pre_tokenizer.__getstate__()) | |
| if pre_tok_state.get("add_prefix_space", add_prefix_space) != add_prefix_space: | |
| pre_tok_class = getattr(pre_tokenizers, pre_tok_state.pop("type")) | |
| pre_tok_state["add_prefix_space"] = add_prefix_space | |
| self.backend_tokenizer.pre_tokenizer = pre_tok_class(**pre_tok_state) | |
| self.add_prefix_space = add_prefix_space | |
| def add_eos_token(self): | |
| return self._add_eos_token | |
| def add_bos_token(self): | |
| return self._add_bos_token | |
| def add_eos_token(self, value): | |
| self._add_eos_token = value | |
| self.update_post_processor() | |
| def add_bos_token(self, value): | |
| self._add_bos_token = value | |
| self.update_post_processor() | |
| def update_post_processor(self): | |
| bos = self.bos_token | |
| bos_token_id = self.bos_token_id | |
| if bos is None and self.add_bos_token: | |
| raise ValueError("add_bos_token = True but bos_token = None") | |
| eos = self.eos_token | |
| eos_token_id = self.eos_token_id | |
| if eos is None and self.add_eos_token: | |
| raise ValueError("add_eos_token = True but eos_token = None") | |
| single = f"{(bos+':0 ') if self.add_bos_token else ''}$A:0{(' '+eos+':0') if self.add_eos_token else ''}" | |
| pair = f"{single}{(' '+bos+':1') if self.add_bos_token else ''} $B:1{(' '+eos+':1') if self.add_eos_token else ''}" | |
| special_tokens = [] | |
| if self.add_bos_token: | |
| special_tokens.append((bos, bos_token_id)) | |
| if self.add_eos_token: | |
| special_tokens.append((eos, eos_token_id)) | |
| self._tokenizer.post_processor = processors.TemplateProcessing( | |
| single=single, pair=pair, special_tokens=special_tokens | |
| ) | |
| def get_special_tokens_mask( | |
| self, token_ids_0: List[int], token_ids_1: Optional[List[int]] = None, already_has_special_tokens: bool = False | |
| ) -> List[int]: | |
| if already_has_special_tokens: | |
| return super().get_special_tokens_mask( | |
| token_ids_0=token_ids_0, token_ids_1=token_ids_1, already_has_special_tokens=True | |
| ) | |
| bos_token_id = [1] if self.add_bos_token else [] | |
| eos_token_id = [1] if self.add_eos_token else [] | |
| if token_ids_1 is None: | |
| return bos_token_id + ([0] * len(token_ids_0)) + eos_token_id | |
| return ( | |
| bos_token_id | |
| + ([0] * len(token_ids_0)) | |
| + eos_token_id | |
| + bos_token_id | |
| + ([0] * len(token_ids_1)) | |
| + eos_token_id | |
| ) | |
| def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None): | |
| bos_token_id = [self.bos_token_id] if self.add_bos_token else [] | |
| eos_token_id = [self.eos_token_id] if self.add_eos_token else [] | |
| output = bos_token_id + token_ids_0 + eos_token_id | |
| if token_ids_1 is not None: | |
| output = output + bos_token_id + token_ids_1 + eos_token_id | |
| return output | |
| def save_vocabulary(self, save_directory: str, filename_prefix: Optional[str] = None) -> Tuple[str]: | |
| files = self._tokenizer.model.save(save_directory, name=filename_prefix) | |
| return tuple(files) | |
| def default_chat_template(self): | |
| return "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}" | |
| """ | |
| Tool call template not added | |
| """ |