mirror of
https://github.com/deepseek-ai/DeepSeek-R1.git
synced 2026-11-05 00:47:42 +00:00
[GH-ISSUE #802] Embedding-aware API for DeepSeek #659
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-R1#659
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @stasf25 on GitHub (Feb 22, 2026).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/802
Hi DeepSeek team and community!
I'd like to propose an addition to the DeepSeek API that would enable
P-tuning and other embedding-based techniques directly through the API.
The idea is simple: add an endpoint that accepts raw embedding tensors
alongside (or instead of) text, while keeping the current token-based billing.
This would allow researchers and engineers to:
The implementation is minimal (concatenate embeddings before forward pass),
but the possibilities it opens up are enormous.
Full RFC with technical details and examples is below.
Looking forward to your feedback!
embedding-api-rfc.md
RFC: Embedding-aware API for DeepSeek
Author: DeepSeek Community
Date: 2026-02-22
Status: Proposal
Executive Summary
Add support for raw embedding tensors as input to DeepSeek API, while keeping the current billing model (pay-per-token). This minimal change opens up enormous possibilities for researchers and developers, while fully preserving DeepSeek's business model.
Motivation
Current Situation
Opportunity for DeepSeek
DeepSeek can give this audience the ability to work through the API, getting paid for the compute they would use anyway. Consider:
Proposed API
Minimal Implementation
Alternative: Extend Existing API
Tensor Format
[num_virtual_tokens, hidden_size]Billing — Unchanged
Key point: DeepSeek gets paid for exactly the same compute as before. Virtual tokens are no different from regular ones in terms of inference cost.
Technical Complexity
For DeepSeek (Implementation)
Effort: 1 person-day
Additional load: negligible (one concatenation)
Risks: none (full backward compatibility)
Use Cases
Example 1: P-tuning for Classification
Example 2: Prefix Prompts (p-tuned model inference)
Example 3: Controlled Generation via Embedding Manipulation
Example 4: Custom Adapters for Enterprise
Target Audience
Security
Why This Benefits DeepSeek
Competitor Comparison
Conclusion
This minimal change opens up enormous possibilities for the community while fully preserving DeepSeek's business model. Researchers gain access to large models without expensive hardware; DeepSeek gets paid for the compute they would use anyway.
Technically: simple
Commercially: profitable
Strategically: timely
@github-actions[bot] commented on GitHub (Mar 25, 2026):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this issue is still relevant, please leave a comment to keep it open. Thank you for your contributions!
@github-actions[bot] commented on GitHub (Apr 8, 2026):
false