# Show GN: LLMLingua-2의 TypeScript 구현체

> Clean Markdown view of GeekNews topic #20958. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=20958](https://news.hada.io/topic?id=20958)
- GeekNews Markdown: [https://news.hada.io/topic/20958.md](https://news.hada.io/topic/20958.md)
- Type: show
- Author: [letaem77a](https://news.hada.io/@letaem77a)
- Published: 2025-05-17T20:35:23+09:00
- Updated: 2025-05-17T20:35:23+09:00
- Original source: [atjsh.github.io](https://atjsh.github.io/llmlingua-2-js)
- Points: 2
- Comments: 0

## Topic Body

> 마이크로소프트에서 개발한 "LLM 기반 범용 프롬프트 압축기" LLMLingua를, 더 다양한 환경에서 사용할 수 있도록, 파이썬에서 타입스크립트로 포팅하는 오픈소스 프로젝트.  
  
#### LLMLingua란?  
  
- [GeekNews: "Microsoft LLMLingua - 추론 가속 및 비용 절감을 위해 프롬프트 압축하기"](https://news.hada.io/topic?id=12470)  
- [LLMLingua-2 홈페이지](https://llmlingua.com/llmlingua2.html)  
- 현재 [Python(파이썬) 언어로 공식 구현](https://pypi.org/project/llmlingua/)되어 배포되고 있음.  
  
#### LLMLingua-2의 TypeScript 구현체  
  
- **[프롬프트 압축 데모 (GitHub Pages)](https://atjsh.github.io/llmlingua-2-js/)**  
  - JavaScript + React + Vite  
  - 데모 체험 요구사항: WebGPU가 지원되는 브라우저 필요 (Windows/macOS Google Chrome 등)  
- 소스코드: [GitHub](https://github.com/atjsh/llmlingua-2-js) 및 [HuggingFace](https://huggingface.co/atjsh/llmlingua-2-js-xlm-roberta-large-meetingbank)에서 확인 가능  
- 패키지 (npm): [npm install @atjsh/llmlingua-2](https://www.npmjs.com/package/@atjsh/llmlingua-2)  
  
#### 하이라이트  
- Python으로 작성되어 있던 LLMLingua-2 파이프라인을 순수 TypeScript로 포팅  
- 구현에 사용한 라이브러리: [js-tiktoken](https://www.npmjs.com/package/js-tiktoken), [transformer.js](https://github.com/huggingface/transformers.js/) 및 [TensorFlow.js](https://github.com/tensorflow/tfjs)   
- Node.js 지원은 추가 개발 진행 중 (지금 바로 테스트는 가능)  
- MIT 라이선스 기반 오픈 소스  
  
#### 아직 초창기 단계  
  
- `use_context_level_filter`, `return_word_label` 등 몇몇 기능은 미구현 상태  
- 핵심 기능인 프롬프트 압축 기능조차, 원래의 LLMLingua-2에 비해 **잘못 구현된 부분이 존재**할 수 있음... ㅜ

## Comments



_No public comments on this page._
