Text Generation
Safetensors
GGUF
English
embeddings-are-overpriced
frozen-embedding
binary-codes
ternary
bitnet
gemma-3
small-language-model
cpu-inference
research
Instructions to use QLNI/embeddings-are-overpriced 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 QLNI/embeddings-are-overpriced 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 QLNI/embeddings-are-overpriced:Q4_K_M # Run inference directly in the terminal: llama cli -hf QLNI/embeddings-are-overpriced:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf QLNI/embeddings-are-overpriced:Q4_K_M # Run inference directly in the terminal: llama cli -hf QLNI/embeddings-are-overpriced: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 QLNI/embeddings-are-overpriced:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QLNI/embeddings-are-overpriced: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 QLNI/embeddings-are-overpriced:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QLNI/embeddings-are-overpriced:Q4_K_M
Use Docker
docker model run hf.co/QLNI/embeddings-are-overpriced:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use QLNI/embeddings-are-overpriced with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QLNI/embeddings-are-overpriced" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QLNI/embeddings-are-overpriced", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/QLNI/embeddings-are-overpriced:Q4_K_M
- Ollama
How to use QLNI/embeddings-are-overpriced with Ollama:
ollama run hf.co/QLNI/embeddings-are-overpriced:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use QLNI/embeddings-are-overpriced with Docker Model Runner:
docker model run hf.co/QLNI/embeddings-are-overpriced:Q4_K_M
- Lemonade
How to use QLNI/embeddings-are-overpriced with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QLNI/embeddings-are-overpriced:Q4_K_M
Run and chat with the model
lemonade run user.embeddings-are-overpriced-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Download code/emoji_test.py from QLNI/embeddings-are-overpriced: direct link, hf CLI and curl.
- Browser
- Download file 3.52 kB
-
https://huggingface.co/QLNI/embeddings-are-overpriced/resolve/main/code/emoji_test.py
- Command line
-
hf download hf://QLNI/embeddings-are-overpriced/code/emoji_test.py
-
curl -L -o emoji_test.py https://huggingface.co/QLNI/embeddings-are-overpriced/resolve/main/code/emoji_test.py
3.52 kB
| """Emoji prediction with tokens the model almost never saw. | |
| tweet_eval 'emoji' (SemEval-2018 task 2): 20 emoji classes; given a tweet, which emoji goes with it? Each emoji is a | |
| single Gemma token that appeared only ~3-120 times in our 2.05B English training tokens (a rare row: in A nearly | |
| untrained; in B/C the frozen code still carries Gemma's meaning). Zero-shot: score the 20 emoji as the next token after | |
| "<tweet> " and take the best. Accuracy with 95% bootstrap range; baselines: uniform 5%, majority class. | |
| python emoji_test.py --arm B --ckpt hf/B/step_07820.pt [--n 2000] | |
| """ | |
| import argparse, json, pathlib | |
| import numpy as np, pandas as pd, torch, torch.nn.functional as F | |
| import fastc | |
| # SemEval-2018 Task 2 (English) label order, as used by tweet_eval 'emoji' | |
| EMOJI = ["β€", "π", "π", "π", "π₯", "π", "π", "β¨", "π", "π", "π·", "πΊπΈ", "β", "π", "π", "π―", "π", "π", "πΈ", "π"] | |
| def main(): | |
| ap = argparse.ArgumentParser() | |
| ap.add_argument("--arm", required=True); ap.add_argument("--ckpt", required=True); ap.add_argument("--tag", default="") | |
| ap.add_argument("--n", type=int, default=2000); ap.add_argument("--data", default="data") | |
| a = ap.parse_args() | |
| from transformers import AutoTokenizer | |
| from huggingface_hub import hf_hub_download | |
| tok = AutoTokenizer.from_pretrained("google/gemma-3-270m"); sep = tok.eos_token_id | |
| counts = np.load(pathlib.Path(a.data) / "unigram_counts.npy") | |
| df = pd.read_parquet(hf_hub_download("cardiffnlp/tweet_eval", "emoji/test-00000-of-00001.parquet", repo_type="dataset")) | |
| df = df.sample(frac=1, random_state=0).head(a.n) | |
| cands = [tok(" " + e, add_special_tokens=False).input_ids for e in EMOJI] | |
| info = {e: {"pieces": len(c), "train_count": int(sum(counts[i] for i in c))} for e, c in zip(EMOJI, cands)} | |
| m, tag = fastc.load(a.arm, a.ckpt, counts); tag = a.tag or tag | |
| correct, lp_true = [], [] | |
| for text, y in zip(df["text"], df["label"]): | |
| ids = [sep] + tok(str(text).strip(), add_special_tokens=False).input_ids | |
| ids = ids[-500:] | |
| scores = [] | |
| for c in cands: | |
| x = torch.tensor([ids + c], device="cuda") | |
| with torch.autocast("cuda", dtype=torch.bfloat16): | |
| lg = m.logits(m.hidden(x[:, :-1])).float() | |
| lp = F.log_softmax(lg[0, -len(c):], -1) | |
| scores.append(float(lp.gather(-1, x[0, -len(c):, None]).sum())) | |
| pred = int(np.argmax(scores)); correct.append(int(pred == int(y))); lp_true.append(scores[int(y)]) | |
| correct = np.array(correct); rng = np.random.default_rng(0) | |
| b = correct[rng.integers(0, len(correct), (10000, len(correct)))].mean(1) | |
| maj = df["label"].value_counts(normalize=True).max() | |
| R = {"tag": tag, "n": int(len(correct)), "accuracy": float(correct.mean()), "ci95": [float(np.percentile(b, 2.5)), float(np.percentile(b, 97.5))], | |
| "majority_baseline": float(maj), "uniform_baseline": 0.05, "mean_logprob_true": float(np.mean(lp_true)), "emoji": info, | |
| "per_label_acc": {EMOJI[k]: float(correct[df["label"].values == k].mean()) for k in range(20) if (df["label"].values == k).any()}} | |
| print(f"{tag}: accuracy {R['accuracy']*100:.1f}% ({R['ci95'][0]*100:.1f}-{R['ci95'][1]*100:.1f}) | majority {maj*100:.1f}% | uniform 5%", flush=True) | |
| pathlib.Path("reports").mkdir(exist_ok=True) | |
| json.dump(R, open(f"reports/emoji_{tag}.json", "w"), indent=1, ensure_ascii=False) | |
| if __name__ == "__main__": | |
| main() | |