Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generation post-processing doesn't produce citations #30093

Open
5 tasks done
molokanov50 opened this issue Mar 4, 2025 · 0 comments
Open
5 tasks done

Generation post-processing doesn't produce citations #30093

molokanov50 opened this issue Mar 4, 2025 · 0 comments

Comments

@molokanov50
Copy link

molokanov50 commented Mar 4, 2025

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangChain documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

from langchain_huggingface import ChatHuggingFace, HuggingFacePipeline

llmPre = HuggingFacePipeline.from_model_id(
            model_id='RefalMachine/RuadaptQwen2.5-14B-Instruct',
            task="text-generation",
            pipeline_kwargs=dict(
                max_new_tokens=512,
                do_sample=False,
                repetition_penalty=1.03,
            ),
        )

llm = ChatHuggingFace(llm=llmPre)

Error Message and Stack Trace (if applicable)

No response

Description

With the abovementioned initialization of llm, no annotations are produced according to Generation post-processing section of documentation.
E.g., I checked result["annotation"], it's always None.

System Info

System Information

OS: Linux
OS Version: #141~20.04.1-Ubuntu SMP Thu Jan 16 18:38:51 UTC 2025
Python Version: 3.11.4 (main, Jul 5 2023, 13:45:01) [GCC 11.2.0]

Package Information

langchain_core: 0.3.29
langchain: 0.3.14
langchain_community: 0.3.14
langsmith: 0.2.10
langchain_huggingface: 0.1.2
langchain_milvus: 0.1.8
langchain_text_splitters: 0.3.5
langgraph_sdk: 0.1.51

Optional packages not installed

langserve

Other Dependencies

aiohttp: 3.11.11
async-timeout: Installed. No version info available.
dataclasses-json: 0.6.7
httpx: 0.28.1
httpx-sse: 0.4.0
huggingface-hub: 0.27.1
jsonpatch: 1.33
langsmith-pyo3: Installed. No version info available.
numpy: 1.26.4
orjson: 3.10.14
packaging: 24.2
pydantic: 2.10.5
pydantic-settings: 2.7.1
pymilvus: 2.5.3
PyYAML: 6.0.2
requests: 2.32.3
requests-toolbelt: 1.0.0
sentence-transformers: 3.3.1
SQLAlchemy: 2.0.37
tenacity: 9.0.0
tokenizers: 0.21.0
transformers: 4.48.0
typing-extensions: 4.12.2
zstandard: Installed. No version info available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant