Text Generation
Transformers
Safetensors
lfm3
liquid
edge
conversational
custom-code
weight-edited
custom_code
Instructions to use cbert33/LFM3-1.7B-UtilityModel-edited-weights with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cbert33/LFM3-1.7B-UtilityModel-edited-weights with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cbert33/LFM3-1.7B-UtilityModel-edited-weights", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cbert33/LFM3-1.7B-UtilityModel-edited-weights", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("cbert33/LFM3-1.7B-UtilityModel-edited-weights", trust_remote_code=True, device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cbert33/LFM3-1.7B-UtilityModel-edited-weights with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cbert33/LFM3-1.7B-UtilityModel-edited-weights" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cbert33/LFM3-1.7B-UtilityModel-edited-weights", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cbert33/LFM3-1.7B-UtilityModel-edited-weights
- SGLang
How to use cbert33/LFM3-1.7B-UtilityModel-edited-weights 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 "cbert33/LFM3-1.7B-UtilityModel-edited-weights" \ --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": "cbert33/LFM3-1.7B-UtilityModel-edited-weights", "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 "cbert33/LFM3-1.7B-UtilityModel-edited-weights" \ --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": "cbert33/LFM3-1.7B-UtilityModel-edited-weights", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cbert33/LFM3-1.7B-UtilityModel-edited-weights with Docker Model Runner:
docker model run hf.co/cbert33/LFM3-1.7B-UtilityModel-edited-weights
Clean internal paths from manifest
Browse files- WRITE-MANIFEST.json +41 -73
WRITE-MANIFEST.json
CHANGED
|
@@ -1,74 +1,42 @@
|
|
| 1 |
-
{
|
| 2 |
-
"beta": 0.0035,
|
| 3 |
-
"
|
| 4 |
-
"rows": [
|
| 5 |
-
2718,
|
| 6 |
-
38184,
|
| 7 |
-
99,
|
| 8 |
-
66641,
|
| 9 |
-
67035,
|
| 10 |
-
64331,
|
| 11 |
-
1155,
|
| 12 |
-
56481,
|
| 13 |
-
19744,
|
| 14 |
-
87907,
|
| 15 |
-
91613,
|
| 16 |
-
10259,
|
| 17 |
-
65912,
|
| 18 |
-
63933,
|
| 19 |
-
9042,
|
| 20 |
-
14485,
|
| 21 |
-
827,
|
| 22 |
-
2025,
|
| 23 |
-
105938,
|
| 24 |
-
17315,
|
| 25 |
-
29973,
|
| 26 |
-
6601,
|
| 27 |
-
98331,
|
| 28 |
-
36813,
|
| 29 |
-
48989,
|
| 30 |
-
14475,
|
| 31 |
-
22481,
|
| 32 |
-
20677,
|
| 33 |
-
104900,
|
| 34 |
-
33565,
|
| 35 |
-
25856,
|
| 36 |
-
10445,
|
| 37 |
-
18976
|
| 38 |
-
],
|
| 39 |
-
"
|
| 40 |
-
"
|
| 41 |
-
|
| 42 |
-
"beta": 0.00227,
|
| 43 |
-
"hbar_norm": 73.20661926269531,
|
| 44 |
-
"fam_rows": [
|
| 45 |
-
207,
|
| 46 |
-
8,
|
| 47 |
-
469,
|
| 48 |
-
318,
|
| 49 |
-
604,
|
| 50 |
-
920,
|
| 51 |
-
833,
|
| 52 |
-
514,
|
| 53 |
-
703,
|
| 54 |
-
473,
|
| 55 |
-
64466,
|
| 56 |
-
64952,
|
| 57 |
-
96460,
|
| 58 |
-
95504,
|
| 59 |
-
3103,
|
| 60 |
-
13124
|
| 61 |
-
],
|
| 62 |
-
"row_99": 99,
|
| 63 |
-
"untied": true,
|
| 64 |
-
"source": "D:\\projects\\model edit\\lfm-weight-edit\\weights-fp16\\LFM3-1.7B",
|
| 65 |
-
"lm_head_arithmetic": "screen-replica bf16 add (matches screen_v4.py exactly)",
|
| 66 |
-
"verification": "all src tensors byte-identical; lm_head == screen-replica recomputation",
|
| 67 |
-
"verified_by": "verify_write_v4.py (torch-based, bf16-safe)",
|
| 68 |
-
"verified_at": "2026-11-08 12:02:10"
|
| 69 |
-
},
|
| 70 |
-
"lm_head_arithmetic": "screen-replica bf16 add (matches screen_rc_bounds.py)",
|
| 71 |
-
"three_a_rows_unchanged": true,
|
| 72 |
-
"untouched_rows_identical": true,
|
| 73 |
-
"verified_at": "2026-11-12 08:20:06"
|
| 74 |
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"beta": 0.0035,
|
| 3 |
+
"direction_norm": 40.855552673339844,
|
| 4 |
+
"rows": [
|
| 5 |
+
2718,
|
| 6 |
+
38184,
|
| 7 |
+
99,
|
| 8 |
+
66641,
|
| 9 |
+
67035,
|
| 10 |
+
64331,
|
| 11 |
+
1155,
|
| 12 |
+
56481,
|
| 13 |
+
19744,
|
| 14 |
+
87907,
|
| 15 |
+
91613,
|
| 16 |
+
10259,
|
| 17 |
+
65912,
|
| 18 |
+
63933,
|
| 19 |
+
9042,
|
| 20 |
+
14485,
|
| 21 |
+
827,
|
| 22 |
+
2025,
|
| 23 |
+
105938,
|
| 24 |
+
17315,
|
| 25 |
+
29973,
|
| 26 |
+
6601,
|
| 27 |
+
98331,
|
| 28 |
+
36813,
|
| 29 |
+
48989,
|
| 30 |
+
14475,
|
| 31 |
+
22481,
|
| 32 |
+
20677,
|
| 33 |
+
104900,
|
| 34 |
+
33565,
|
| 35 |
+
25856,
|
| 36 |
+
10445,
|
| 37 |
+
18976
|
| 38 |
+
],
|
| 39 |
+
"arithmetic": "bf16 add",
|
| 40 |
+
"json_edit_rows_unchanged": true,
|
| 41 |
+
"untouched_rows_identical": true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
}
|