Neithanvarvas commited on
Commit
4f44f20
·
verified ·
1 Parent(s): dde517d

[UPDATE] Loader handles git-lfs pointer files; hf download instructions; limitation note

Browse files
Files changed (2) hide show
  1. README.md +5 -1
  2. cbt/__init__.py +2 -1
README.md CHANGED
@@ -32,11 +32,14 @@ The same model also does simple tool calling (weather, search, calculator, unit
32
  ## Try it
33
 
34
  ```bash
35
- git clone https://huggingface.co/Neithanvarvas/CBT && cd CBT
 
36
  pip install -r requirements.txt
37
  python chat.py
38
  ```
39
 
 
 
40
  ```text
41
  > 123456789+987654321
42
  scratchpad : (0+9+1)=10(1+8+2)=11(1+7+3)=11(1+6+4)=11 ... (1+0+0)=01
@@ -133,6 +136,7 @@ Scratchpad steps read `(carry + digit_a + digit_b) = carry_out digit`, from the
133
  ## Limitations
134
 
135
  - Addition of non-negative integers is the only arithmetic it was trained on. Accuracy drops beyond 55 digits, and the 1024-character context caps sums at roughly 75 digits.
 
136
  - The chat ability is narrow: it was trained on synthetic tool-calling dialogues with a fixed set of tools. It is not a general assistant and has little world knowledge.
137
  - Character-level, English-only, ASCII-only. Other characters become `<UNK>`.
138
 
 
32
  ## Try it
33
 
34
  ```bash
35
+ pip install -U huggingface_hub
36
+ hf download Neithanvarvas/CBT --local-dir CBT && cd CBT
37
  pip install -r requirements.txt
38
  python chat.py
39
  ```
40
 
41
+ `git clone https://huggingface.co/Neithanvarvas/CBT` also works; without git-lfs the weights are fetched on first run.
42
+
43
  ```text
44
  > 123456789+987654321
45
  scratchpad : (0+9+1)=10(1+8+2)=11(1+7+3)=11(1+6+4)=11 ... (1+0+0)=01
 
136
  ## Limitations
137
 
138
  - Addition of non-negative integers is the only arithmetic it was trained on. Accuracy drops beyond 55 digits, and the 1024-character context caps sums at roughly 75 digits.
139
+ - Replies can drift into garbled text after the tool result (for example, "What is the weather in Paris?" ends with misspelled filler).
140
  - The chat ability is narrow: it was trained on synthetic tool-calling dialogues with a fixed set of tools. It is not a general assistant and has little world knowledge.
141
  - Character-level, English-only, ASCII-only. Other characters become `<UNK>`.
142
 
cbt/__init__.py CHANGED
@@ -28,7 +28,8 @@ def _resolve(source: Optional[str], filename: str) -> str:
28
  """Finds `filename` in a local folder (default: the repo root next to this package) or downloads it."""
29
  folder = source or os.path.dirname(_PKG_DIR)
30
  local = os.path.join(folder, filename)
31
- if os.path.isfile(local):
 
32
  return local
33
  from huggingface_hub import hf_hub_download
34
  return hf_hub_download(repo_id=source if source and not os.path.isdir(source) else REPO_ID, filename=filename)
 
28
  """Finds `filename` in a local folder (default: the repo root next to this package) or downloads it."""
29
  folder = source or os.path.dirname(_PKG_DIR)
30
  local = os.path.join(folder, filename)
31
+ # A clone made without git-lfs leaves a ~130-byte pointer file instead of the weights.
32
+ if os.path.isfile(local) and not (filename.endswith(".safetensors") and os.path.getsize(local) < 1024):
33
  return local
34
  from huggingface_hub import hf_hub_download
35
  return hf_hub_download(repo_id=source if source and not os.path.isdir(source) else REPO_ID, filename=filename)