Text Generation
Safetensors
GGUF
English
picolm_v3
picolm
slm
on-device
custom_code
causal-lm
reasoning
conversational
Instructions to use aethertp/PicoLM-V3-Pro-82M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use aethertp/PicoLM-V3-Pro-82M-Instruct with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M # Run inference directly in the terminal: llama cli -hf aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M # Run inference directly in the terminal: llama cli -hf aethertp/PicoLM-V3-Pro-82M-Instruct: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 aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf aethertp/PicoLM-V3-Pro-82M-Instruct: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 aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M
Use Docker
docker model run hf.co/aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use aethertp/PicoLM-V3-Pro-82M-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aethertp/PicoLM-V3-Pro-82M-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aethertp/PicoLM-V3-Pro-82M-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M
- Ollama
How to use aethertp/PicoLM-V3-Pro-82M-Instruct with Ollama:
ollama run hf.co/aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use aethertp/PicoLM-V3-Pro-82M-Instruct with Docker Model Runner:
docker model run hf.co/aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M
- Lemonade
How to use aethertp/PicoLM-V3-Pro-82M-Instruct with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull aethertp/PicoLM-V3-Pro-82M-Instruct:Q4_K_M
Run and chat with the model
lemonade run user.PicoLM-V3-Pro-82M-Instruct-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Upload modeling_picolm_v3.py with huggingface_hub
Browse files- modeling_picolm_v3.py +1 -2
modeling_picolm_v3.py
CHANGED
|
@@ -98,6 +98,7 @@ class TransformerBlockV3(nn.Module):
|
|
| 98 |
class PicoLMV3ForCausalLM(PreTrainedModel, GenerationMixin):
|
| 99 |
config_class = PicoLMV3Config
|
| 100 |
base_model_prefix = "model"
|
|
|
|
| 101 |
|
| 102 |
def __init__(self, config):
|
| 103 |
super().__init__(config)
|
|
@@ -117,7 +118,6 @@ class PicoLMV3ForCausalLM(PreTrainedModel, GenerationMixin):
|
|
| 117 |
def set_input_embeddings(self, value):
|
| 118 |
self.tok_embeddings = value
|
| 119 |
|
| 120 |
-
# attention_mask parametresi açıkça eklendi
|
| 121 |
def forward(self, input_ids=None, attention_mask=None, labels=None, past_key_values=None, **kwargs):
|
| 122 |
B, S = input_ids.shape
|
| 123 |
x_low = self.tok_embeddings(input_ids)
|
|
@@ -138,7 +138,6 @@ class PicoLMV3ForCausalLM(PreTrainedModel, GenerationMixin):
|
|
| 138 |
|
| 139 |
return CausalLMOutputWithPast(loss=loss, logits=logits)
|
| 140 |
|
| 141 |
-
# prepare_inputs_for_generation attention_mask'ı artık yakalıyor
|
| 142 |
def prepare_inputs_for_generation(self, input_ids, attention_mask=None, **kwargs):
|
| 143 |
model_inputs = {"input_ids": input_ids}
|
| 144 |
if attention_mask is not None:
|
|
|
|
| 98 |
class PicoLMV3ForCausalLM(PreTrainedModel, GenerationMixin):
|
| 99 |
config_class = PicoLMV3Config
|
| 100 |
base_model_prefix = "model"
|
| 101 |
+
_supports_cache_class = False
|
| 102 |
|
| 103 |
def __init__(self, config):
|
| 104 |
super().__init__(config)
|
|
|
|
| 118 |
def set_input_embeddings(self, value):
|
| 119 |
self.tok_embeddings = value
|
| 120 |
|
|
|
|
| 121 |
def forward(self, input_ids=None, attention_mask=None, labels=None, past_key_values=None, **kwargs):
|
| 122 |
B, S = input_ids.shape
|
| 123 |
x_low = self.tok_embeddings(input_ids)
|
|
|
|
| 138 |
|
| 139 |
return CausalLMOutputWithPast(loss=loss, logits=logits)
|
| 140 |
|
|
|
|
| 141 |
def prepare_inputs_for_generation(self, input_ids, attention_mask=None, **kwargs):
|
| 142 |
model_inputs = {"input_ids": input_ids}
|
| 143 |
if attention_mask is not None:
|