Skip to content

Commit 86bafd0

Browse files
committed
Revert "possibly unstable, needs testing for fa"
This reverts commit 257992d, reversing changes made to 9dd6b4c.
1 parent 8738fa1 commit 86bafd0

32 files changed

+372
-777
lines changed

.github/copilot-instructions.md

Lines changed: 0 additions & 262 deletions
This file was deleted.

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ jobs:
3939
run: |
4040
sudo apt-get update
4141
sudo apt-get install build-essential libcurl4-openssl-dev
42-
# Install git-clang-format script for formatting only changed code
43-
wget -O /tmp/git-clang-format https://raw.githubusercontent.com/llvm/llvm-project/release/18.x/clang/tools/clang-format/git-clang-format
44-
sudo cp /tmp/git-clang-format /usr/local/bin/git-clang-format
45-
sudo chmod +x /usr/local/bin/git-clang-format
4642
4743
- name: Set up Python
4844
uses: actions/setup-python@v5
@@ -54,4 +50,4 @@ jobs:
5450
python3 -m venv .venv
5551
.venv/bin/activate
5652
pip install -r requirements/requirements-all.txt -r tools/server/tests/requirements.txt
57-
pip install flake8 pyright pre-commit
53+
pip install flake8 pyright

common/common.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,13 @@ std::string string_from(const struct llama_context * ctx, const std::vector<llam
566566

567567
auto detokenized = common_token_to_piece(ctx, token);
568568

569+
detokenized.erase(
570+
std::remove_if(
571+
detokenized.begin(),
572+
detokenized.end(),
573+
[](const unsigned char c) { return !std::isprint(c); }),
574+
detokenized.end());
575+
569576
buf << "'" << detokenized << "'"
570577
<< ":" << std::to_string(token);
571578
}
@@ -590,6 +597,13 @@ std::string string_from(const struct llama_context * ctx, const struct llama_bat
590597

591598
auto detokenized = common_token_to_piece(ctx, batch.token[i]);
592599

600+
detokenized.erase(
601+
std::remove_if(
602+
detokenized.begin(),
603+
detokenized.end(),
604+
[](const unsigned char c) { return !std::isprint(c); }),
605+
detokenized.end());
606+
593607
buf << "\n" << std::to_string(i)
594608
<< ", token '" << detokenized << "'"
595609
<< ", pos " << std::to_string(batch.pos[i])

0 commit comments

Comments
 (0)