David Alvarez-Melis, Nicolò Fusi, Neil Tenenholtz, Junhong Shen, James Hall
We lifted 12 functions out of this paper's own repositories and ran 8 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| sjunhongshen/Tag-LLM | canonical | 4 of 5 |
| sjunhongshen/tag-llm | — | 4 of 7 |
| Function | Status | Where it lives |
|---|---|---|
| AugmentedTokenEncoder | Ran | sjunhongshen/tag-llm/src/tag_llama.py pointer only (licence: NONE) · get_code("e518de1c5154e4de") |
| TagLlamaRotaryEmbedding | Ran | sjunhongshen/tag-llm/src/tag_llama.py pointer only (licence: NONE) · get_code("28d8cd93b790eb3b") |
| _expand_mask | Ran | sjunhongshen/tag-llm/src/tag_llama.py pointer only (licence: NONE) · get_code("a85227444bd04c75") |
| _make_causal_mask | Ran | sjunhongshen/tag-llm/src/tag_llama.py pointer only (licence: NONE) · get_code("c0290d783d0faae8") |
| drug_target_collate_fn | Ran | sjunhongshen/Tag-LLM/src/TDCdata.py pointer only (licence: NONE) · get_code("e45a97b52b823610") |
| nested_select | Ran | sjunhongshen/Tag-LLM/src/metrics.py pointer only (licence: NONE) · get_code("330bcd19fcdb2147") |
| simple_basename | Ran | sjunhongshen/Tag-LLM/src/arguments.py pointer only (licence: NONE) · get_code("d73f2cdc8a6da456") |
| strip_special_tokens | Ran | sjunhongshen/Tag-LLM/src/metrics.py pointer only (licence: NONE) · get_code("a76b500245a3c895") |
| TagLlamaAttention | Not yet run | sjunhongshen/tag-llm/src/tag_llama.py pointer only (licence: NONE) · get_code("ac1f13679668276b") |
| TagLlamaDecoderLayer | Not yet run | sjunhongshen/tag-llm/src/tag_llama.py pointer only (licence: NONE) · get_code("cd0950c94372a4e4") |
| TagLlamaModel | Not yet run | sjunhongshen/tag-llm/src/tag_llama.py pointer only (licence: NONE) · get_code("6bfbe95e48d141a0") |
| postprocess_text | Not yet run | sjunhongshen/Tag-LLM/src/metrics.py pointer only (licence: NONE) · get_code("85f31f5811b9b51a") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Large Language Models (LLMs) have demonstrated remarkable proficiency in understanding and generating natural language. However, their capabilities wane in highly specialized domains underrepresented in the pretraining corpus, such as physical and biomedical sciences. This work explores how to repurpose general LLMs into effective task solvers for specialized domains. We introduce a novel, model-agnostic framework for learning custom input tags, which are parameterized as continuous vectors appended to the LLM's embedding layer, to condition the LLM. We design two types of input tags: domain tags are used to delimit specialized representations (e.g., chemical formulas) and provide domain-relevant context; function tags are used to represent specific functions (e.g., predicting molecular properties) and compress function-solving instructions. We develop a three-stage protocol to learn these tags using auxiliary data and domain knowledge. By explicitly disentangling task domains from task functions, our method enables zero-shot generalization to unseen problems through diverse combinations of the input tags. It also boosts LLM's performance in various specialized domains, such as predicting protein or chemical properties and modeling drug-target interactions, outperforming expert models tailored to these tasks.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2402.05140")
get_code_for_paper("2402.05140")
have("2402.05140")
Connect an agent — have() is free.