diff --git a/lark/common.py b/lark/common.py
index cc8c73c..714399a 100644
--- a/lark/common.py
+++ b/lark/common.py
@@ -17,9 +17,6 @@ class LexerConf(Serialize):
         self.skip_validation = skip_validation
         self.use_bytes = use_bytes
 
-    def _deserialize(self):
-        self.callbacks = {} # TODO
-
 ###}
 
 class ParserConf:
diff --git a/lark/lark.py b/lark/lark.py
index daab45b..3ed96d7 100644
--- a/lark/lark.py
+++ b/lark/lark.py
@@ -344,7 +344,14 @@ class Lark(Serialize):
         self.rules = [Rule.deserialize(r, memo) for r in data['rules']]
         self.source = '<deserialized>'
         self._prepare_callbacks()
-        self.parser = self.parser_class.deserialize(data['parser'], memo, self._callbacks, self.options.postlex, re_module)
+        self.parser = self.parser_class.deserialize(
+            data['parser'],
+            memo,
+            self._callbacks,
+            self.options.postlex,
+            self.options.transformer,
+            re_module
+        )
         return self
 
     @classmethod
diff --git a/lark/parser_frontends.py b/lark/parser_frontends.py
index 33ad9bc..a45bf9c 100644
--- a/lark/parser_frontends.py
+++ b/lark/parser_frontends.py
@@ -1,6 +1,6 @@
 from .utils import get_regexp_width, Serialize
 from .parsers.grammar_analysis import GrammarAnalyzer
-from .lexer import TraditionalLexer, ContextualLexer, Lexer, Token
+from .lexer import TraditionalLexer, ContextualLexer, Lexer, Token, TerminalDef
 from .parsers import earley, xearley, cyk
 from .parsers.lalr_parser import LALR_Parser
 from .grammar import Rule
@@ -58,6 +58,16 @@ class _ParserFrontend(Serialize):
         return self.parser.parse(input, start, *args)
 
 
+def _recreate_lexer_callbacks(memo, transformer):
+    result = {}
+    terminals = [item for item in memo.values() if isinstance(item, TerminalDef)]
+    for terminal in terminals:
+        callback = getattr(transformer, terminal.name, None)
+        if callback is not None:
+            result[terminal.name] = callback
+    return result
+
+
 class WithLexer(_ParserFrontend):
     lexer = None
     parser = None
@@ -73,10 +83,11 @@ class WithLexer(_ParserFrontend):
         self.postlex = lexer_conf.postlex
 
     @classmethod
-    def deserialize(cls, data, memo, callbacks, postlex, re_module):
+    def deserialize(cls, data, memo, callbacks, postlex, transformer, re_module):
         inst = super(WithLexer, cls).deserialize(data, memo)
         inst.postlex = postlex
         inst.parser = LALR_Parser.deserialize(inst.parser, memo, callbacks)
+        inst.lexer_conf.callbacks = _recreate_lexer_callbacks(memo, transformer)
         inst.lexer_conf.re_module = re_module
         inst.lexer_conf.skip_validation=True
         inst.init_lexer()
@@ -229,4 +240,3 @@ class CYK(WithLexer):
 
     def _apply_callback(self, tree):
         return self.callbacks[tree.rule](tree.children)
-

Transformer is not applied for tokens in standalone parser
**Describe the bug**
Standalone parser doesn't invoke methods on tokens defined in supplied transformer

**To Reproduce**
Given:
- grammar `example.lark`:
```
start: IDENTIFIER "(" text ")"
IDENTIFIER: /[A-Za-z_][A-Za-z0-9_]*/
text: IDENTIFIER
```
- standalone parser generated with: `python3 -m lark.tools.standalone example.lark > example.py`

Then:
- this program:
```python
import lark

class DowncaseIdentifiers(lark.Transformer):
    def IDENTIFIER(self, token):
        return lark.Token("IDENTIFIER", token.lower())

    def text(self, children):
        return lark.Tree("text", [self.IDENTIFIER(children[0])])

parser = lark.Lark.open(
    grammar_filename="example.lark", transformer=DowncaseIdentifiers(), parser="lalr"
)
to_parse = "FOO(BAR)"
result = parser.parse(to_parse)
print(result.pretty())
```
produces:
```
start
  foo
  text  bar
```
- this program:
```python
import example

class DowncaseIdentifiers(example.Transformer):
    def IDENTIFIER(self, token):
        return example.Token("IDENTIFIER", token.lower())

    def text(self, children):
        return example.Tree("text", [self.IDENTIFIER(children[0])])

parser = example.Lark_StandAlone(transformer=DowncaseIdentifiers())
to_parse = "FOO(BAR)"
result = parser.parse(to_parse)
print(result.pretty())
```
produces:
```
start
  FOO
  text  bar
```

Expected:
Both programs produce the same output, namely:
```
start
  foo
  text  bar
```
diff --git a/tests/test_tools.py b/tests/test_tools.py
index 1e0d78e..e691237 100644
--- a/tests/test_tools.py
+++ b/tests/test_tools.py
@@ -106,6 +106,33 @@ class TestStandalone(TestCase):
         x = l.parse('(\n)\n')
         self.assertEqual(x, Tree('start', []))
 
+    def test_transformer(self):
+        grammar = r"""
+            start: some_rule "(" SOME_TERMINAL ")"
+            some_rule: SOME_TERMINAL
+            SOME_TERMINAL: /[A-Za-z_][A-Za-z0-9_]*/
+        """
+        context = self._create_standalone(grammar)
+        _Lark = context["Lark_StandAlone"]
+
+        _Token = context["Token"]
+        _Tree = context["Tree"]
+
+        class MyTransformer(context["Transformer"]):
+            def SOME_TERMINAL(self, token):
+                return _Token("SOME_TERMINAL", "token is transformed")
+
+            def some_rule(self, children):
+                return _Tree("rule_is_transformed", [])
+
+        parser = _Lark(transformer=MyTransformer())
+        self.assertEqual(
+            parser.parse("FOO(BAR)"),
+            _Tree("start", [
+                _Tree("rule_is_transformed", []),
+                _Token("SOME_TERMINAL", "token is transformed")
+            ])
+        )
 
 
 if __name__ == '__main__':

pip install -e .[dev]
parse_log_pytest
pytest
Js2Py regex pytest
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
backports.zoneinfo==0.2.1
certifi==2021.5.30
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
importlib-resources==5.4.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
Js2Py==0.74
-e git+https://github.com/lark-parser/lark.git@c9ca287e9e2ae2a3f5ad7cf028fdabf408f053a1#egg=lark_parser
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pyjsparser==2.7.1
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
pytz-deprecation-shim==0.1.0.post0
regex==2023.8.8
six==1.17.0
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
tzdata==2025.2
tzlocal==4.2
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: lark
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - backports-zoneinfo==0.2.1
      - importlib-resources==5.4.0
      - js2py==0.74
      - pyjsparser==2.7.1
      - pytz-deprecation-shim==0.1.0.post0
      - regex==2023.8.8
      - six==1.17.0
      - tzdata==2025.2
      - tzlocal==4.2
prefix: /opt/conda/envs/lark

tests/test_tools.py::TestStandalone::test_transformer
tests/test_tools.py::TestStandalone::test_contextual tests/test_tools.py::TestStandalone::test_postlex tests/test_tools.py::TestStandalone::test_simple
lark/common.py lark/parser_frontends.py lark/lark.py
lark/common.py lark/parser_frontends.py lark/lark.py