Text Generation
Transformers
Safetensors
English
Chinese
qwen3
qwen3-8b
lora
qlora
sft
rag
faiss
dense-retrieval
agent
ppo
rlhf
rule-reward
harness-engineering
um-handbook
question-answering
chatbot
education
tensor-talk
Instructions to use TensorCat/TensorTalk with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TensorCat/TensorTalk with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TensorCat/TensorTalk")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TensorCat/TensorTalk", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TensorCat/TensorTalk with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TensorCat/TensorTalk" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TensorCat/TensorTalk", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TensorCat/TensorTalk
- SGLang
How to use TensorCat/TensorTalk with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "TensorCat/TensorTalk" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TensorCat/TensorTalk", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "TensorCat/TensorTalk" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TensorCat/TensorTalk", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TensorCat/TensorTalk with Docker Model Runner:
docker model run hf.co/TensorCat/TensorTalk
Document deployment and add demo GIF
Browse files- .gitattributes +1 -0
- README.md +56 -2
- UM_Handbook/assets/tensortalk-simulation.gif +3 -0
.gitattributes
CHANGED
|
@@ -44,3 +44,4 @@ UM_Handbook/outputs/baseline2_rag_harness_agent/lora_adapter/tokenizer.json filt
|
|
| 44 |
UM_Handbook/outputs/baseline2_rag_harness_agent/trainer_runs/checkpoint-1100/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 45 |
UM_Handbook/outputs/baseline2_rag_harness_agent/trainer_runs/checkpoint-1300/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 46 |
UM_Handbook/assets/tensortalk-rag-inspector.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 44 |
UM_Handbook/outputs/baseline2_rag_harness_agent/trainer_runs/checkpoint-1100/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 45 |
UM_Handbook/outputs/baseline2_rag_harness_agent/trainer_runs/checkpoint-1300/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 46 |
UM_Handbook/assets/tensortalk-rag-inspector.png filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
UM_Handbook/assets/tensortalk-simulation.gif filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -30,9 +30,50 @@ tags:
|
|
| 30 |
|
| 31 |
# TensorTalk
|
| 32 |
|
| 33 |
-
**TensorTalk** is a Universiti Malaya Faculty of Computer Science and Information Technology handbook QA
|
| 34 |
|
| 35 |
-
The
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
## Project Screenshot
|
| 38 |
|
|
@@ -66,6 +107,7 @@ The project compares three stages:
|
|
| 66 |
| Metadata-aware reranker | Uses scope, section, subsection, and keywords to reduce wrong-context answers. |
|
| 67 |
| Official web helper | Searches constrained official UM/FSKTM-related sources when local handbook evidence is not enough. |
|
| 68 |
| Harness engineering | Runs source guards, fake-URL guards, evidence checks, grounding checks, retry logic, and fallback rules. |
|
|
|
|
| 69 |
| TensorTalk UI | Shows answers together with traceable RAG, web, and harness evidence panels. |
|
| 70 |
|
| 71 |
## Data Assets
|
|
@@ -99,6 +141,16 @@ The 521 handbook chunks are split into 58 general, 250 postgraduate, and 213 und
|
|
| 99 |
|
| 100 |
The retrieval results show why the project moved beyond closed-book SFT. The model can speak in the right academic tone after fine-tuning, but RAG and harness checks make the answers more evidence-grounded and easier to audit.
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
## Repository Map
|
| 103 |
|
| 104 |
```text
|
|
@@ -157,6 +209,8 @@ model.eval()
|
|
| 157 |
|
| 158 |
For the full TensorTalk behavior shown in the screenshot, use the adapter together with the RAG knowledge base, FAISS retriever, official-source web helper, and harness checks from the notebooks. The model weights alone do not include the live retrieval index or web-agent runtime.
|
| 159 |
|
|
|
|
|
|
|
| 160 |
## Intended Use
|
| 161 |
|
| 162 |
TensorTalk is intended for research, education, and demonstration of:
|
|
|
|
| 30 |
|
| 31 |
# TensorTalk
|
| 32 |
|
| 33 |
+
**TensorTalk** is a fully deployed Universiti Malaya Faculty of Computer Science and Information Technology handbook QA system built around **Qwen3-8B**, supervised fine-tuning, metadata-aware RAG, an official-source web helper, and a guarded harness for traceable answers.
|
| 34 |
|
| 35 |
+
The project includes the research and training pipeline in this repository, a separately maintained model repository, and a complete Vercel-deployed frontend experience. The live application provides conversation history, handbook and official-web routing, semantic retrieval controls, answer traces, grounding status, and source-aware responses.
|
| 36 |
+
|
| 37 |
+
## Live Deployment
|
| 38 |
+
|
| 39 |
+
**Try TensorTalk:** [https://tensor-talk.vercel.app/](https://tensor-talk.vercel.app/)
|
| 40 |
+
|
| 41 |
+
| Project Component | Link | Role |
|
| 42 |
+
| --- | --- | --- |
|
| 43 |
+
| Live web application | [tensor-talk.vercel.app](https://tensor-talk.vercel.app/) | Public Vercel deployment for interacting with TensorTalk. |
|
| 44 |
+
| Frontend source code | [github.com/nfdlh/tensor-talk](https://github.com/nfdlh/tensor-talk) | Source repository for the deployed web interface. |
|
| 45 |
+
| Model repository | [huggingface.co/nfdlh/tensortalk](https://huggingface.co/nfdlh/tensortalk) | Related TensorTalk model repository used by the deployed project. |
|
| 46 |
+
| Training and research repository | [TensorCat/TensorTalk/UM_Handbook](https://huggingface.co/TensorCat/TensorTalk/tree/main/UM_Handbook) | SFT, RAG, agent-harness, PPO, datasets, adapters, and evaluation artifacts. |
|
| 47 |
+
|
| 48 |
+
### Deployment Architecture
|
| 49 |
+
|
| 50 |
+
```text
|
| 51 |
+
User Browser
|
| 52 |
+
|
|
| 53 |
+
v
|
| 54 |
+
Vercel Frontend
|
| 55 |
+
https://tensor-talk.vercel.app/
|
| 56 |
+
|
|
| 57 |
+
+-- Conversation threads and responsive chat interface
|
| 58 |
+
+-- Semantic retrieval and routing controls
|
| 59 |
+
+-- Evidence, grounding, and tracing views
|
| 60 |
+
|
|
| 61 |
+
v
|
| 62 |
+
TensorTalk Model + RAG / Agent Harness
|
| 63 |
+
|
|
| 64 |
+
+-- UM handbook knowledge base
|
| 65 |
+
+-- Metadata-aware dense retrieval
|
| 66 |
+
+-- Official UM / FSKTM web-source helper
|
| 67 |
+
+-- Evidence and answer-grounding checks
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
The frontend deployment turns the research notebooks and model artifacts into a complete user-facing application. It exposes the system's intermediate retrieval and validation states instead of presenting TensorTalk as a black-box chatbot.
|
| 71 |
+
|
| 72 |
+
## Project Demonstration
|
| 73 |
+
|
| 74 |
+
The following GIF is generated from the complete deployment walkthrough. The original HDR recording was brightness-normalized for readability and accelerated to keep the README demonstration practical.
|
| 75 |
+
|
| 76 |
+

|
| 77 |
|
| 78 |
## Project Screenshot
|
| 79 |
|
|
|
|
| 107 |
| Metadata-aware reranker | Uses scope, section, subsection, and keywords to reduce wrong-context answers. |
|
| 108 |
| Official web helper | Searches constrained official UM/FSKTM-related sources when local handbook evidence is not enough. |
|
| 109 |
| Harness engineering | Runs source guards, fake-URL guards, evidence checks, grounding checks, retry logic, and fallback rules. |
|
| 110 |
+
| Vercel frontend | Provides the deployed conversation workspace, history, retrieval controls, and trace views. |
|
| 111 |
| TensorTalk UI | Shows answers together with traceable RAG, web, and harness evidence panels. |
|
| 112 |
|
| 113 |
## Data Assets
|
|
|
|
| 141 |
|
| 142 |
The retrieval results show why the project moved beyond closed-book SFT. The model can speak in the right academic tone after fine-tuning, but RAG and harness checks make the answers more evidence-grounded and easier to audit.
|
| 143 |
|
| 144 |
+
## End-to-End Project Flow
|
| 145 |
+
|
| 146 |
+
1. Handbook PDFs are converted into structured Markdown.
|
| 147 |
+
2. Source chunks and question-answer datasets are built with scope and source metadata.
|
| 148 |
+
3. Qwen3-8B is adapted with SFT using LoRA / QLoRA.
|
| 149 |
+
4. BGE embeddings and FAISS retrieve handbook evidence, followed by metadata-aware reranking.
|
| 150 |
+
5. The agent harness validates sources, rejects unsupported evidence, retries weak retrieval, and checks answer grounding.
|
| 151 |
+
6. Rule-reward PPO experiments further shape response behavior.
|
| 152 |
+
7. The Vercel frontend exposes the complete workflow through an interactive deployed experience.
|
| 153 |
+
|
| 154 |
## Repository Map
|
| 155 |
|
| 156 |
```text
|
|
|
|
| 209 |
|
| 210 |
For the full TensorTalk behavior shown in the screenshot, use the adapter together with the RAG knowledge base, FAISS retriever, official-source web helper, and harness checks from the notebooks. The model weights alone do not include the live retrieval index or web-agent runtime.
|
| 211 |
|
| 212 |
+
For an immediate end-to-end demonstration, use the [deployed TensorTalk web application](https://tensor-talk.vercel.app/).
|
| 213 |
+
|
| 214 |
## Intended Use
|
| 215 |
|
| 216 |
TensorTalk is intended for research, education, and demonstration of:
|
UM_Handbook/assets/tensortalk-simulation.gif
ADDED
|
Git LFS Details
|