Text Generation
Transformers
Safetensors
English
model_n_embed_16_binary_n_layer_32
feature-extraction
causal-lm
transformer
decoder-only
fixed-embeddings
binary-token-codes
research
custom_code
Instructions to use Bochkov/llm-fix-min-fixed-minimal-binary-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Bochkov/llm-fix-min-fixed-minimal-binary-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Bochkov/llm-fix-min-fixed-minimal-binary-code", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Bochkov/llm-fix-min-fixed-minimal-binary-code", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Bochkov/llm-fix-min-fixed-minimal-binary-code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Bochkov/llm-fix-min-fixed-minimal-binary-code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bochkov/llm-fix-min-fixed-minimal-binary-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Bochkov/llm-fix-min-fixed-minimal-binary-code
- SGLang
How to use Bochkov/llm-fix-min-fixed-minimal-binary-code 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 "Bochkov/llm-fix-min-fixed-minimal-binary-code" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bochkov/llm-fix-min-fixed-minimal-binary-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Bochkov/llm-fix-min-fixed-minimal-binary-code" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bochkov/llm-fix-min-fixed-minimal-binary-code", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Bochkov/llm-fix-min-fixed-minimal-binary-code with Docker Model Runner:
docker model run hf.co/Bochkov/llm-fix-min-fixed-minimal-binary-code
Update README.md
Browse files
README.md
CHANGED
|
@@ -165,7 +165,6 @@ expected = ((ids[:, None] >> positions[None, :]) & 1).float()
|
|
| 165 |
expected[model.config.pad_token_id].zero_()
|
| 166 |
|
| 167 |
print("shape:", tuple(weight.shape))
|
| 168 |
-
print("requires_grad:", embedding.weight.requires_grad)
|
| 169 |
print("unique values:", torch.unique(weight).tolist())
|
| 170 |
print("all entries binary:", bool(torch.all((weight == 0) | (weight == 1))))
|
| 171 |
print("exact canonical-code match:", bool(torch.equal(weight, expected)))
|
|
@@ -180,7 +179,6 @@ Expected audit properties:
|
|
| 180 |
|
| 181 |
```text
|
| 182 |
shape: (65536, 16)
|
| 183 |
-
requires_grad: True
|
| 184 |
unique values: [0.0, 1.0]
|
| 185 |
all entries binary: True
|
| 186 |
exact canonical-code match: True
|
|
|
|
| 165 |
expected[model.config.pad_token_id].zero_()
|
| 166 |
|
| 167 |
print("shape:", tuple(weight.shape))
|
|
|
|
| 168 |
print("unique values:", torch.unique(weight).tolist())
|
| 169 |
print("all entries binary:", bool(torch.all((weight == 0) | (weight == 1))))
|
| 170 |
print("exact canonical-code match:", bool(torch.equal(weight, expected)))
|
|
|
|
| 179 |
|
| 180 |
```text
|
| 181 |
shape: (65536, 16)
|
|
|
|
| 182 |
unique values: [0.0, 1.0]
|
| 183 |
all entries binary: True
|
| 184 |
exact canonical-code match: True
|