releases.shpreview

3.0.2

$npx -y @buildinternet/releases show rel_kXhr-GOV8NcJ_blCHhme1

What's new?

  • Add support for MobileLLM in https://github.com/huggingface/transformers.js/pull/1003

    Example: Text generation with onnx-community/MobileLLM-125M.

    import { pipeline } from "@huggingface/transformers";
    
    // Create a text generation pipeline
    const generator = await pipeline(
      "text-generation",
      "onnx-community/MobileLLM-125M",
      { dtype: "fp32" },
    );
    
    // Define the list of messages
    const text = "Q: What is the capital of France?\nA: Paris\nQ: What is the capital of England?\nA:";
    
    // Generate a response
    const output = await generator(text, { max_new_tokens: 30 });
    console.log(output[0].generated_text);
    <details> <summary>Example output</summary>
    Q: What is the capital of France?
    A: Paris
    Q: What is the capital of England?
    A: London
    Q: What is the capital of Scotland?
    A: Edinburgh
    Q: What is the capital of Wales?
    A: Cardiff
    
    </details>
  • Add support for OLMo in https://github.com/huggingface/transformers.js/pull/1011

    Example: Text generation with onnx-community/AMD-OLMo-1B-SFT-DPO".

    import { pipeline } from "@huggingface/transformers";
    
    // Create a text generation pipeline
    const generator = await pipeline(
      "text-generation",
      "onnx-community/AMD-OLMo-1B-SFT-DPO",
      { dtype: "q4" },
    );
    
    // Define the list of messages
    const messages = [
      { role: "system", content: "You are a helpful assistant." },
      { role: "user", content: "Tell me a joke." },
    ];
    
    // Generate a response
    const output = await generator(messages, { max_new_tokens: 128 });
    console.log(output[0].generated_text.at(-1).content);
    <details> <summary>Example output</summary>
    Why don't scientists trust atoms?
    
    Because they make up everything!
    
    </details>
  • Fix CommonJS bundling in https://github.com/huggingface/transformers.js/pull/1012. Thanks @jens-ghc for reporting!

  • Doc fixes by @roschler in https://github.com/huggingface/transformers.js/pull/1002

  • Remove duplicate gemma value from NO_PER_CHANNEL_REDUCE_RANGE_MODEL by @bekzod in https://github.com/huggingface/transformers.js/pull/1005

🤗 New contributors

Full Changelog: https://github.com/huggingface/transformers.js/compare/3.0.1...3.0.2

Fetched April 7, 2026